X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fbootstrap.mk;h=af84565457bcb2f74479c2777315569df6e54af0;hb=89d6434a7ddb499c5b09eb3c70437782b0dcd501;hp=32d131313155ac8801d9f16124ecea429de131ef;hpb=c872dd3e96aeacfeff2c7e4f3991aa28cd6d4734;p=ghc-hetmet.git diff --git a/mk/bootstrap.mk b/mk/bootstrap.mk index 32d1313..af84565 100644 --- a/mk/bootstrap.mk +++ b/mk/bootstrap.mk @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: bootstrap.mk,v 1.29 2004/01/15 18:04:45 ross Exp $ +# $Id: bootstrap.mk,v 1.33 2005/01/27 13:00:14 simonmar Exp $ # # Makefile rules for booting from .hc files without a driver. # @@ -17,6 +17,8 @@ include $(TOP)/mk/paths.mk # Reset TOP TOP:=$(TOP_SAVED) +include $(TOP)/mk/suffix.mk + # ----------------------------------------------------------------------------- # Set the platform-specific options to send to the C compiler. These should # match the list in machdepCCOpts in ghc/compiler/DriverFlags.hs. @@ -59,16 +61,19 @@ endif ifeq "$(BootingFromUnregisterisedHc)" "YES" PLATFORM_HC_BOOT_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER -SRC_CC_OPTS += -DNO_REGS -DUSE_MINIINTERPRETER -# Add these flags to SRC_CC_OPTS too, because they need to be passed to the plain .c -# files in ghc/rts. endif PLATFORM_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) HC_BOOT_CC_OPTS = $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS) $(CC_OPTS) -SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/ghc/includes -I$(FPTOOLS_TOP_ABS)/libraries/base/include -I$(FPTOOLS_TOP_ABS)/libraries/unix/include +SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/ghc/includes -I$(FPTOOLS_TOP_ABS)/libraries/base/include -I$(FPTOOLS_TOP_ABS)/libraries/unix/include -I$(FPTOOLS_TOP_ABS)/libraries/parsec/include + +# C code compiled with UseGhcForCc=YES assumes the existence of certain CPP +# symbols defined by GHC (eg. __GLASGOW_HASKELL__), so we better make sure +# they're defined. We can't test $(UseGhcForCc) here though - it isn't defined +# yet, so we use lazy expansion. +SRC_CC_OPTS += $(if $(findstring YES,$(UseGhcForCc)), $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS)) ifeq "$(GhcWithInterpreter)" "YES" SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/libraries/readline/include @@ -98,6 +103,8 @@ ifeq "$(GhcWithInterpreter)" "YES" HC_BOOT_LD_OPTS += \ -L$(FPTOOLS_TOP_ABS)/libraries/template-haskell \ -L$(FPTOOLS_TOP_ABS)/libraries/readline \ + -L$(FPTOOLS_TOP_ABS)/libraries/parsec \ + -L$(FPTOOLS_TOP_ABS)/libraries/Cabal \ -L$(FPTOOLS_TOP_ABS)/libraries/unix \ -L$(FPTOOLS_TOP_ABS)/libraries/unix/cbits endif @@ -142,7 +149,7 @@ ifeq "$(GhcWithInterpreter)" "YES" HC_BOOT_LIBS += -lHSreadline -lHStemplate-haskell -lHSunix -lHSunix_cbits endif -HC_BOOT_LIBS += -lHShaskell98 -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS) +HC_BOOT_LIBS += -lHSCabal -lHShaskell98 -lHSbase -lHSbase_cbits -lHSparsec -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS) ifeq "$(GhcLibsWithReadline)" "YES" HC_BOOT_LIBS += $(patsubst %, -l%, $(LibsReadline))