[project @ 2001-09-08 21:42:07 by sof]
[ghc-hetmet.git] / ghc / lib / std / Makefile
index 7f01561..0fdeebc 100644 (file)
@@ -38,7 +38,8 @@ BOOT_SRCS += PrelPrimopWrappers.hs
 #-----------------------------------------------------------------------------
 #      Setting the GHC compile options
 
-SRC_HC_OPTS += -cpp -fglasgow-exts $(GhcLibHcOpts)
+# -fvia-C added because NCG still can't cope with some primops used in the standard library
+SRC_HC_OPTS += -fvia-C -cpp -fglasgow-exts $(GhcLibHcOpts)
 SRC_HSC2HS_OPTS += -Icbits
 
 ifdef USE_REPORT_PRELUDE
@@ -63,6 +64,11 @@ PrelCError_HC_OPTS   = +RTS -K4m -RTS
 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
 
 #-----------------------------------------------------------------------------
+#      Pre-processing (.pp) files
+SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) -traditional
+SRC_CPP_OPTS += ${GhcLibCppOpts}
+
+#-----------------------------------------------------------------------------
 #      Rules
 
 PrelPrimopWrappers.hs: ../../compiler/prelude/primops.txt
@@ -105,21 +111,21 @@ GHCI_LIBOBJS = $(filter-out PrelMain.$(way_)o,$(HS_OBJS))
 
 
 ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-#              Standard rule
-HSstd.o :: $(GHCI_LIBOBJS)
-       ld -r -x -o $@ $(GHCI_LIBOBJS)
-
+LIBOBJS=$(GHCI_LIBOBJS)
 else
 #              Rule for Win32 platform
 # Keep HSstd.o as a pseudo-target (I think)
+
+# Turn off standard rule which creates HSstd.o from LIBOBJS.
+DONT_WANT_STD_GHCI_LIB_RULE=YES
+
 HSstd.o :: $(GHCI_LIBOBJS)
        ld -r -x -o HSstd1.o $(filter     Prel%, $(GHCI_LIBOBJS))
        ld -r -x -o HSstd2.o $(filter-out Prel%, $(GHCI_LIBOBJS))
+       @touch HSstd.o
 endif # TARGETPLATFORM = i386-unknown-mingw32
 
 
-
-
 #-----------------------------------------------------------------------------
 #      Installation; need to install .hi files as well as libraries
 #
@@ -181,9 +187,6 @@ PrelGHC.$(way_)o: PrelGHC.ilx.real
        $(ILASM) /QUIET /DLL /OUT=$@ $@.il
 #      mv $@.tmp $@
 
-std.dll: $(HS_OBJS)
-       al -out:$@ $(HS_OBJS)
-
 std.$(way_)mvl: $(HS_IL)
        ((ILVALID_HOME=c:\\devel\\fcom\\src\\ ILVALID_MSCORLIB=mscorlib.vlb $(ILVALID) c:\\devel\\fcom\\src\\bin\\msilxlib$(ilx2il_suffix).vlb $(HS_IL)) 2>&1) | tee $@