# -----------------------------------------------------------------------------
-# $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
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 = \
# 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
# 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.
# 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
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)
# 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