[project @ 2000-12-06 13:03:28 by simonmar]
[ghc-hetmet.git] / ghc / compiler / Makefile
index d6345ac..6fc7daf 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.107 2000/11/03 11:30:23 sewardj Exp $
+# $Id: Makefile,v 1.117 2000/11/22 10:13:43 sewardj Exp $
 
 TOP = ..
 include $(TOP)/mk/boilerplate.mk
@@ -39,6 +39,7 @@ $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk Makefile
        @echo "cProjectName          = \"$(ProjectName)\"" >> $(CONFIG_HS)
        @echo "cProjectVersion       = \"$(ProjectVersion)\"" >> $(CONFIG_HS)
        @echo "cProjectVersionInt    = \"$(ProjectVersionInt)\"" >> $(CONFIG_HS)
+       @echo "cBooterVersion        = \"$(GhcVersion)\"" >> $(CONFIG_HS)
        @echo "cHscIfaceFileVersion  = \"$(HscIfaceFileVersion)\"" >> $(CONFIG_HS)
        @echo "cHOSTPLATFORM         = \"$(HOSTPLATFORM)\"" >> $(CONFIG_HS)
        @echo "cTARGETPLATFORM       = \"$(TARGETPLATFORM)\"" >> $(CONFIG_HS)
@@ -82,7 +83,7 @@ $(HS_PROG) :: $(HS_SRCS)
 
 
 # -----------------------------------------------------------------------------
-#              Set SRCS, LOOPS, HCS, OBJS
+#              Set SRCS, HCS, OBJS
 #
 # First figure out DIRS, the source sub-directories
 # Then derive SRCS by looking in them
@@ -107,18 +108,13 @@ endif
 ifeq "$(GhcWithInterpreter)" "YES"
 ghc_409_at_least = $(shell expr "$(GhcMinVersion)" \>= 9)
 ifeq "$(ghc_409_at_least)" "1"
-SRC_HC_OPTS += -DGHCI
+SRC_HC_OPTS += -DGHCI -optc-DGHCI
 DIRS += ghci
 endif
 endif
 
 HS_SRCS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.lhs) $(wildcard $(dir)/*.hs))
 
-# ToDo: not clear why this is here -- messes up linking
-#ifneq "$(GhcWithHscBuiltViaC)" "YES"
-#HS_SRCS += rename/ParseIface.hs parser/Parser.hs
-#endif
-
 HCS      = $(patsubst %.lhs, %.hc, $(patsubst %.hs, %.hc, $(HS_SRCS)))
 
 # ParseIface.hs ain't part of HS_SRCS when this is on..
@@ -174,12 +170,12 @@ SRC_HC_OPTS += \
 ghc_407_at_least = $(shell expr "$(GhcMinVersion)" \>= 7)
 ifeq "$(ghc_407_at_least)" "1"
 ifneq "$(mingw32_TARGET_OS)" "1"
-SRC_HC_OPTS += -package concurrent -package posix -package text
+SRC_HC_OPTS += -package concurrent -package posix -package text -package util
 else
-SRC_HC_OPTS += -package concurrent -package text
+SRC_HC_OPTS += -package concurrent -package text -package util
 endif
 else
-SRC_HC_OPTS += -syslib concurrent -syslib posix -syslib misc
+SRC_HC_OPTS += -syslib concurrent -syslib posix -syslib misc -syslib util
 endif
 
 SRC_CC_OPTS += -Iparser -I. -I$(TOP)/includes -O
@@ -196,7 +192,7 @@ absCSyn/PprAbsC_HC_OPTS     = -H10m
 basicTypes/IdInfo_HC_OPTS      = -K2m
 codeGen/CgCase_HC_OPTS         = -fno-prune-tydecls
 hsSyn/HsExpr_HC_OPTS           = -K2m
-main/Main_HC_OPTS              = 
+main/Main_HC_OPTS              = -fvia-C
 
 ifneq "$(GhcWithHscBuiltViaC)" "YES"
 ifeq "$(GhcReportCompiles)" "YES"
@@ -212,7 +208,7 @@ nativeGen/MachCode_HC_OPTS  = -H10m
 # Avoids Bug in 3.02, it seems
 usageSP/UsageSPInf_HC_OPTS     = -Onot
 
-prelude/PrimOp_HC_OPTS                 = -H12m -K3m
+prelude/PrimOp_HC_OPTS                 = -H12m -K3m -no-recomp
 
 # because the NCG can't handle the 64-bit math in here
 prelude/PrelRules_HC_OPTS      = -fvia-C
@@ -439,10 +435,8 @@ INSTALL_PROGS += $(HS_PROG)
 #
 # Before doing `make depend', need to build all derived Haskell source files
 #
-depend :: $(LOOPS)
-
 ifneq "$(GhcWithHscBuiltViaC)" "YES"
-depend :: rename/ParseIface.hs
+depend :: rename/ParseIface.hs parser/Parser.hs
 endif
 
 #-----------------------------------------------------------------------------
@@ -453,9 +447,9 @@ CLEAN_FILES += $(PRIMOP_BITS)
 
 # Extra tidy, remove the .hc files (if you've got them).
 MAINTAINER_CLEAN_FILES += $(wildcard */*.hc) \
+       parser/Parser.info rename/ParseIface.info \
        parser/Parser.hs rename/ParseIface.hs
 
-
 #-----------------------------------------------------------------------------
 #              TAGS setup