[project @ 1997-08-25 22:42:15 by sof]
[ghc-hetmet.git] / ghc / lib / Makefile
index 76e8dbf..4d0fcf8 100644 (file)
@@ -4,8 +4,6 @@
 #
 #              Makefile for building the GHC Prelude libraries umpteen ways
 #
-#      $Id: Makefile,v 1.6 1997/03/17 20:34:49 simonpj Exp $
-#
 #      
 #################################################################################
 
@@ -31,17 +29,17 @@ LIBRARY = libHS$(_way).a
 HS_SRCS        = $(foreach d, $(LIB_DIRS), $(wildcard $(d)/*.lhs))
 HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
 LIBOBJS = $(HS_OBJS)
-HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi) ghc/GHC.hi
+HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi) ghc/GHC.$(way_)hi
 
 #-----------------------------------------------------------------------------
 #      Setting the GHC compile options
 
-SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C $(GhcLibHcOpts)
+SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
 
 #
 # Profiling options
-WAY_p_HC_OPTS += -prof -GPrelude
-WAY_mr_HC_OPTS += -prof -GPrelude
+WAY_p_HC_OPTS += -GPrelude
+WAY_mr_HC_OPTS += -GPrelude
 
 #
 # Object and interface files have suffixes tagged with their ways
@@ -51,55 +49,38 @@ SRC_HC_OPTS += -hisuf $(way_)hi
 endif
 
 # per-module flags
-
-ghc/PackedString_HC_OPTS    += -monly-3-regs
-required/Directory_HC_OPTS  += -monly-3-regs 
-concurrent/Parallel_HC_OPTS += -fglasgow-exts
-required/Time_HC_OPTS       += -monly-3-regs
+ghc/ArrBase_HC_OPTS         += -monly-2-regs
+glaExts/PackedString_HC_OPTS += -monly-3-regs
+required/Directory_HC_OPTS   += -monly-3-regs 
+concurrent/Parallel_HC_OPTS  += -fglasgow-exts
+required/Time_HC_OPTS        += -monly-3-regs -H12m
+
+# Far too much heap is needed to compile PrelNum with -O at the
+# moment, but there you go..
+ghc/PrelNum_HC_OPTS          += -H30m
+# Note: this option has to go in the Makefile rather than in an
+# OPTIONS line in the source file. The reason being that we want
+# to override the SRC_HC_OPTS of -O, and anything option coming
+# from the Makefile overrides what's in OPTIONS lines. (mumble_HC_OPTS
+# does override SRC_HC_OPTS settings)
+ghc/UnsafeST_HC_OPTS         += -Onot
+
+ghc/PrelBase_HC_OPTS         += -H8m
+ghc/PrelRead_HC_OPTS         += -H8m
+ghc/IOHandle_HC_OPTS         += -H8m
 
 #-----------------------------------------------------------------------------
 #      Dependency generation
 
-SRC_MKDEPENDHS_OPTS += -irequired:ghc:hbc:glaExts:concurrent -I$(GHC_INCLUDE_DIR)
+SRC_MKDEPENDHS_OPTS += -ighc:required:glaExts:concurrent -I$(GHC_INCLUDE_DIR)
 
 #-----------------------------------------------------------------------------
 #      Rules
 
-# In preparation for building the various libHS* libraries,
-# we create the interface files needed to boot their build.
-#
-# Note that the creation of IOBase, Main and GHC interface
-# files for umpteen ways is strictly not necessary, they're
-# all the same, but having the redundant files prevents us
-# from having to treat the said interface files specially
-# when creating the dependencies. 
-#
-# Note: if you change the *.hi-boot files, this will not be
-# picked up by the Makefile, you'll have to `make hi-boot'
-#
-# Note2: hsc will only read from ghc/GHC.hi regardless of 
-# which `way' you're compiling, so the copies of the GHC
-# interface file for the different ways are only there
-# to pacify `make'
-
-HIBOOTS=GHC Main IOBase
-
-hi-boot :
-       @for i in norm $(WAYS); do \
-               echo "Booting interface files for way $$i "; \
-               if [ "$$i" != "norm" ]; then \
-                  j="$${i}_hi"; \
-               else \
-                  j='hi'; \
-               fi; \
-               for ifile in $(HIBOOTS); do \
-                       echo ".. ghc/$${ifile}.$$j "; \
-                       cp ghc/$${ifile}.hi-boot ghc/$${ifile}.$${j}; \
-               done; \
-       done
-       @touch ghc/IOBase.lhs
-
-boot :: hi-boot
+ghc/GHC.$(way_)hi      : ghc/GHC.hi-boot
+       cp $< $@
+
+boot :: ghc/GHC.hi $(foreach way, $(WAYS), ghc/GHC.$(way)_hi)
 
 #-----------------------------------------------------------------------------
 #      Installation; need to install .hi files as well as libraries