Mac OS X deployment target: piping opts through Makefiles
[ghc-hetmet.git] / utils / hpc / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 # Beyond stage 1, honour any Mac OS X depolyment target options.  If we use 
5 # these options in stage 1 we get a linker error if the bootstrap compiler is
6 #  for a more recent OS version
7 ifeq "$(stage)" "2"
8 SRC_CC_OPTS += $(MACOSX_DEPLOYMENT_CC_OPTS)
9 SRC_HC_OPTS += $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS))
10 SRC_LD_OPTS += $(addprefix -optl, $(MACOSX_DEPLOYMENT_LD_OPTS))
11 endif
12
13 # We have two version: the inplace version compiled by the bootstrap compiler
14 #   and the install version compiled by the stage 1 compiler
15 ifeq "$(stage)" "2"
16 HS_PROG         = hpc$(exeext)
17 else
18 HS_PROG         = hpc-inplace$(exeext)
19 endif
20 INSTALL_PROGS  += $(HS_PROG)
21 HPC_LIB         = $(TOP)/libraries/hpc
22
23 include $(GHC_COMPAT_DIR)/compat.mk
24 SRC_HC_OPTS += $(PACKAGE_HPC) -cpp 
25
26 ifeq "$(ghc_ge_607)" "YES"
27 SRC_HC_OPTS += -package containers
28 endif
29
30 binary-dist:
31         $(INSTALL_DIR)                $(BIN_DIST_DIR)/utils/hpc
32         $(INSTALL_DATA)    Makefile   $(BIN_DIST_DIR)/utils/hpc/
33         $(INSTALL_PROGRAM) $(HS_PROG) $(BIN_DIST_DIR)/utils/hpc/
34
35 include $(TOP)/mk/target.mk