[project @ 2001-03-16 14:36:19 by sewardj]
[ghc-hetmet.git] / ghc / compiler / Makefile
index 229970e..10d5925 100644 (file)
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.137 2001/02/12 10:15:19 simonmar Exp $
+# $Id: Makefile,v 1.144 2001/03/16 14:36:19 sewardj Exp $
 
 TOP = ..
 include $(TOP)/mk/boilerplate.mk
@@ -109,17 +109,17 @@ endif
 endif
 
 HS_SRCS := $(foreach dir,$(DIRS),$(wildcard $(dir)/*.lhs) $(wildcard $(dir)/*.hs))
-HS_SRCS := $(filter-out rename/ParseIface.hs parser/Parser.hs $(CONFIG_HS), $(HS_SRCS))
+HS_SRCS := $(filter-out rename/ParseIface.hs parser/Parser.hs main/ParsePkgConf.hs $(CONFIG_HS), $(HS_SRCS))
 HS_SRCS += $(CONFIG_HS)
 
-ifneq "$(GhcWithHscBuiltViaC)" "YES"
-HS_SRCS += rename/ParseIface.hs parser/Parser.hs
+ifneq "$(BootingFromHc)" "YES"
+HS_SRCS += rename/ParseIface.hs parser/Parser.hs main/ParsePkgConf.hs
 endif
 
 HCS      = $(patsubst %.lhs, %.hc, $(patsubst %.hs, %.hc, $(HS_SRCS)))
 
-ifeq "$(GhcWithHscBuiltViaC)" "YES"
-HCS    += rename/ParseIface.hc parser/Parser.hc
+ifeq "$(BootingFromHc)" "YES"
+HCS    += rename/ParseIface.hc parser/Parser.hc main/ParsePkgConf.hs
 endif
 
 HS_OBJS  = \
@@ -146,16 +146,13 @@ SRC_MKDEPENDC_OPTS += -D__GLASGOW_HASKELL__=$(ProjectVersionInt)
 # Compiler to use for building ghc, use the build tree
 # driver when booting.
 #
-ifneq "$(GhcWithHscBuiltViaC)" "YES"
 HC=$(GHC)
-else
-HC=$(GHC_INPLACE)
-endif
 
 #
 # Use GHC for compiling C bits
 #
 CC = $(HC)
+CC_OPTS := $(addprefix -optc, $(CC_OPTS))
 
 # magic from GNU make manual to convert a list of values
 # into a colon-separated list
@@ -184,13 +181,14 @@ SRC_HC_OPTS += -H16m
 # not sure if this is required --SDM
 main/Main_HC_OPTS              = -fvia-C
 
-prelude/PrimOp_HC_OPTS                 = -no-recomp
+prelude/PrimOp_HC_OPTS                 = -no-recomp -H80m
 
 # because the NCG can't handle the 64-bit math in here
 prelude/PrelRules_HC_OPTS      = -fvia-C
 
 rename/ParseIface_HC_OPTS      += -Onot -H45m -fno-warn-incomplete-patterns
 parser/Parser_HC_OPTS          += -Onot -fno-warn-incomplete-patterns
+main/ParsePkgConf_HC_OPTS      += -fno-warn-incomplete-patterns
 
 # The latest GHC version doesn't have a -K option yet, and it doesn't
 # seem to be necessary anymore for the modules below.
@@ -217,8 +215,10 @@ utils/Digraph_HC_OPTS              = -fglasgow-exts
 #      into the interface file and spreading the -monly-3-regs virus.
 #      We need -optC here because the driver before 3.02 didn't understand
 #      the -funfolding flags.
+utils/PrimPacked_HC_OPTS       = -fvia-C -monly-3-regs
 
-utils/PrimPacked_HC_OPTS       = -fvia-C -monly-3-regs -funfolding-interface-threshold7
+# ByteCodeItbls uses primops that the NCG doesn't support yet.
+ghci/ByteCodeItbls_HC_OPTS     = -fvia-C
 
 # ----------------------------------------------------------------------------
 #              C compilations
@@ -244,7 +244,7 @@ PRIMOP_BITS=primop-data-decl.hs-incl \
             primop-usage.hs-incl  \
             primop-primop-info.hs-incl
 
-prelude/PrimOp.lhs: $(PRIMOP_BITS)
+prelude/PrimOp.lhs prelude/PrimOp.o: $(PRIMOP_BITS)
 
 depend :: $(PRIMOP_BITS)
 
@@ -313,8 +313,8 @@ 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
+       parser/Parser.info rename/ParseIface.info main/ParsePkgConf.info \
+       parser/Parser.hs rename/ParseIface.hs main/ParsePkgConf.hs
 
 #-----------------------------------------------------------------------------
 #              Include target-rule boilerplate