[project @ 2000-01-13 14:33:57 by hwloidl]
[ghc-hetmet.git] / ghc / lib / std / Makefile
index 83d790e..853c599 100644 (file)
@@ -18,18 +18,15 @@ else
 SUBDIRS=
 endif
 
-HC = $(GHC)
-
 #-----------------------------------------------------------------------------
 #      Setting the standard variables
 #
 
+HC        = $(GHC_INPLACE)
+MKDEPENDHS = $(GHC_INPLACE)
+
 LIBRARY = libHS$(_way).a
-HS_SRCS = $(wildcard *.lhs)
-HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
 LIBOBJS = $(HS_OBJS)
-HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi) PrelGHC.$(way_)hi
-
 
 #-----------------------------------------------------------------------------
 #      Setting the GHC compile options
@@ -50,6 +47,13 @@ ifneq "$(way)" ""
 SRC_HC_OPTS += -hisuf $(way_)hi
 endif
 
+# HWL: for debugging GranSim generate .hc and .s files
+SRC_HC_OPTS += -keep-hc-files-too -keep-s-files-too
+# # HWL: why isn't that on by default !!????????????
+# ifeq "$(way)" "mg"
+# SRC_HC_OPTS += -gransim
+# endif
+
 # per-module flags
 PrelArrExtra_HC_OPTS     += -monly-2-regs
 
@@ -58,7 +62,7 @@ PrelArrExtra_HC_OPTS     += -monly-2-regs
 PrelNumExtra_HC_OPTS     += -H24m -K2m
 
 PrelPack_HC_OPTS        += -K4m
-PrelBase_HC_OPTS         += -H12m
+PrelBase_HC_OPTS         += -H32m -K32m
 PrelRead_HC_OPTS         += -H20m
 PrelTup_HC_OPTS          += -H12m -K2m
 PrelNum_HC_OPTS                 += -H12m -K4m
@@ -100,6 +104,8 @@ all :: PrelMain.dll_o DllVersionInfo.o
 
 endif
 
+CLEAN_FILES += PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi)
+
 #
 # Building PrelMain.dll_o is, unfortunately, somewhat tricky
 # with the current DLL setup. PrelMain.dll_o should refer to
@@ -140,6 +146,6 @@ INSTALL_PROGS += $(DLL_NAME)
 INSTALL_LIBS  += $(patsubst %.a, %_imp.a, $(LIBRARY)) PrelMain.dll_o
 INSTALL_DATAS += dLL_ifs.hi
 endif
-INSTALL_DATAS += $(HS_IFACES)
+INSTALL_DATAS += $(HS_IFACES) PrelGHC.$(way_)hi
 
 include $(TOP)/mk/target.mk