X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fbootstrap.mk;h=30dfa3f5dc74006d1269a5c05492bb551ba7a764;hb=57c3ca2603ef0f2358d8d246bff1dd47ef97e843;hp=e2ffba43869dad4af439623a8686ce1c3ad2857b;hpb=7af3c5a81696045acf584700e417f3cbc8758749;p=ghc-hetmet.git diff --git a/mk/bootstrap.mk b/mk/bootstrap.mk index e2ffba4..30dfa3f 100644 --- a/mk/bootstrap.mk +++ b/mk/bootstrap.mk @@ -1,8 +1,12 @@ # ----------------------------------------------------------------------------- -# $Id: bootstrap.mk,v 1.4 2001/03/27 09:44:56 simonmar Exp $ +# $Id: bootstrap.mk,v 1.8 2001/05/01 09:22:45 simonmar Exp $ # # Makefile rules for booting from .hc files without a driver. # +# When booting from .hc files without a compiler installed, we don't have +# the benefit of the GHC driver to add all the magic options required to +# compile the .hc files, so we have to duplicate that functionality here. +# The result is unfortunately ugly, but we don't have another choice. TOP_SAVED := $(TOP) TOP:=$(TOP)/ghc @@ -46,17 +50,17 @@ endif PLATFORM_CC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt) -HC_BOOT_CC_OPTS = $(PLATFORM_HC_BOOT_CC_OPTS) -D__GLASGOW_HASKELL__=411 $(CC_OPTS) +HC_BOOT_CC_OPTS = $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS) $(CC_OPTS) -SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_LIB_DIR)/std/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/lang/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/posix/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/util/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/text/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/hssource/cbits +SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/ghc/includes -I$(FPTOOLS_TOP_ABS)/ghc/lib/std/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/lang/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/posix/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/util/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/text/cbits -I$(FPTOOLS_TOP_ABS)/hslibs/hssource/cbits # ----------------------------------------------------------------------------- # Linking: we have to give all the libraries explicitly. HC_BOOT_LD_OPTS = \ - -L$(GHC_RUNTIME_DIR) \ - -L$(GHC_LIB_DIR)/std \ - -L$(GHC_LIB_DIR)/std/cbits \ + -L$(FPTOOLS_TOP_ABS)/ghc/rts \ + -L$(FPTOOLS_TOP_ABS)/ghc/lib/std \ + -L$(FPTOOLS_TOP_ABS)/ghc/lib/std/cbits \ -L$(FPTOOLS_TOP_ABS)/hslibs/lang \ -L$(FPTOOLS_TOP_ABS)/hslibs/lang/cbits \ -L$(FPTOOLS_TOP_ABS)/hslibs/concurrent \ @@ -102,7 +106,7 @@ HC_BOOT_LD_OPTS = \ HC_BOOT_LIBS = -lHStext -lHSutil -lHSposix -lHSposix_cbits -lHSconcurrent -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -lgmp $(EXTRA_HC_BOOT_LIBS) ifeq "$(GhcLibsWithReadline)" "YES" -HC_BOOT_LIBS += $(LibsReadline) +HC_BOOT_LIBS += $(patsubst %, -l%, $(LibsReadline)) endif ifeq "$(HaveLibDL)" "YES"