1 #################################################################################
5 # Makefile for building the GHC Prelude libraries umpteen ways
8 #################################################################################
11 include $(TOP)/mk/boilerplate.mk
21 #-----------------------------------------------------------------------------
22 # Setting the standard variables
25 LIBRARY = libHS$(_way).a
26 HS_SRCS = $(wildcard *.lhs)
27 HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
29 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi) PrelGHC.$(way_)hi
32 #-----------------------------------------------------------------------------
33 # Setting the GHC compile options
35 SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
39 WAY_p_HC_OPTS += -GPrelude
40 WAY_mr_HC_OPTS += -GPrelude
43 # Object and interface files have suffixes tagged with their ways
46 SRC_HC_OPTS += -hisuf $(way_)hi
50 PrelArr_HC_OPTS += -monly-2-regs
51 Directory_HC_OPTS += -monly-3-regs
52 Time_HC_OPTS += -monly-3-regs -H16m
54 # Far too much heap is needed to compile PrelNum with -O at the
55 # moment, but there you go..
56 PrelNum_HC_OPTS += -H30m
57 # Note: this option has to go in the Makefile rather than in an
58 # OPTIONS line in the source file. The reason being that we want
59 # to override the SRC_HC_OPTS of -O, and anything option coming
60 # from the Makefile overrides what's in OPTIONS lines. (mumble_HC_OPTS
61 # does override SRC_HC_OPTS settings)
62 PrelUnsafe_HC_OPTS += -Onot
64 PrelBase_HC_OPTS += -H12m
65 PrelRead_HC_OPTS += -H13m
66 PrelTup_HC_OPTS += -H12m
67 PrelArr_HC_OPTS += -H8m
68 PrelHandle_HC_OPTS += -H12m
70 Complex_HC_OPTS += -H10m
72 PrelMain_HC_OPTS += -fno-prune-tydecls # avoids an apparent bug; ToDo
74 #-----------------------------------------------------------------------------
75 # Dependency generation
77 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR)
79 #-----------------------------------------------------------------------------
82 PrelGHC.$(way_)hi : PrelGHC.hi-boot
85 boot :: PrelGHC.hi $(foreach way, $(WAYS), PrelGHC.$(way)_hi)
87 #-----------------------------------------------------------------------------
88 # Installation; need to install .hi files as well as libraries
90 # The interface files are put inside the $(libdir), since they
91 # might (potentially) be platform specific..
93 # override is used here because for binary distributions, datadir is
94 # set on the command line. sigh.
96 override datadir:=$(libdir)/imports/std
99 # Files to install from here
101 INSTALL_LIBS += $(LIBRARY)
102 INSTALL_DATAS += $(HS_IFACES)
104 include $(TOP)/mk/target.mk
106 glaExts/PackedString_HC_OPTS += -monly-3-regs
107 concurrent/Parallel_HC_OPTS += -fglasgow-exts
108 glaExts/Int_HC_OPTS += -H8m
109 glaExts/Word_HC_OPTS += -H8m