#
HC = $(GHC_INPLACE)
-MKDEPENDHS = $(GHC_INPLACE)
+MKDEPENDHS = $(GHC)
-ifneq "$(way)" "dll"
+ifneq "$(DLLized)" "YES"
PACKAGE = -package-name std
else
# Hack by SPJ to delay if-then-else until the pattern rule when we have $*
PACKAGE = $(subst ~, ,$(word $(words dummy $(findstring $(notdir $*), PrelMain )), -package-name~std))
endif
-LIBRARY = libHSstd$(_way).a
-LIBOBJS = $(HS_OBJS)
-ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
-LIBOBJS = $(filter-out PrelHugs.$(way_)o,$(HS_OBJS))
-endif
+HSLIB = std
+
+# we don't want PrelMain in the GHCi library.
+GHCI_LIBOBJS = $(filter-out PrelMain.$(way_)o,$(HS_OBJS))
#-----------------------------------------------------------------------------
# Setting the GHC compile options
-SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts) $(PACKAGE)
-ifneq "$(way)" "dll"
+SRC_HC_OPTS += -recomp -cpp -fvia-C -fglasgow-exts $(GhcLibHcOpts) $(PACKAGE)
+ifneq "$(DLLized)" "YES"
SRC_HC_OPTS += -static
endif
SRC_HC_OPTS += -hisuf $(way_)hi
endif
-# Far too much heap is needed to compile PrelNumExtra with -O at the
-# moment, but there you go..
-PrelNumExtra_HC_OPTS += -H24m -K2m
-
-PrelPack_HC_OPTS += -K4m
-PrelBase_HC_OPTS += -H12m
-PrelRead_HC_OPTS += -H20m
-PrelTup_HC_OPTS += -H12m -K2m
-PrelNum_HC_OPTS += -H12m -K4m
-PrelArr_HC_OPTS += -H8m
-PrelHandle_HC_OPTS += -H20m
-Time_HC_OPTS += -H24m -K2m
-Complex_HC_OPTS += -H10m
-IO_HC_OPTS += -H12m
-List_HC_OPTS += -H8m
-Directory_HC_OPTS += -H8m
-
#-----------------------------------------------------------------------------
# Dependency generation
boot :: PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi)
-DLL_NAME = HSstd.dll
DLL_DESCRIPTION="GHC-compiled Haskell Prelude"
-DLL_IMPLIB_NAME = libHSstd_imp.a
-SRC_BLD_DLL_OPTS += --export-all --output-def=HSstd.def DllVersionInfo.o
-SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHSstd_cbits_imp -lgmp -L. -L../../rts/gmp -L../../rts -Lcbits
-ifeq "$(way)" "dll"
+ifeq "$(DLLized)" "YES"
HS_SRCS := $(filter-out PrelMain.lhs PrelHugs.lhs, $(HS_SRCS))
endif
# PrelMain.dll_o isn't to be included in the final .a,
# but it needs to be generated
-ifeq "$(way)" "dll"
-all :: PrelMain.dll_o DllVersionInfo.o
-
+ifeq "$(DLLized)" "YES"
+all :: PrelMain.dll_o
endif
CLEAN_FILES += PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi)
#
# Files to install from here
#
-INSTALL_LIBS += $(LIBRARY)
-ifeq "$(way)" "dll"
-INSTALL_PROGS += $(DLL_NAME)
-INSTALL_LIBS += $(patsubst %.a, $(LIBRARY)) PrelMain.dll_o
-else
-INSTALL_LIBS += $(patsubst %_imp.a, $(LIBRARY))
+ifeq "$(DLLized)" "YES"
+INSTALL_LIBS += PrelMain.dll_o
endif
-INSTALL_DATAS += $(HS_IFACES) PrelGHC.$(way_)hi
-ifeq "$(way)" "dll"
+
+INSTALL_DATAS += PrelGHC.$(way_)hi
+ifeq "$(DLLized)" "YES"
INSTALL_DATAS := $(filter-out PrelHugs.$(way_)hi,$(INSTALL_DATAS))
endif