1 #################################################################################
5 # Makefile for building the GHC Prelude libraries umpteen ways
8 #################################################################################
11 include $(TOP)/mk/boilerplate.mk
15 #-----------------------------------------------------------------------------
16 # Setting the standard variables
19 LIBRARY = libHSexts$(_way).a
20 HS_SRCS = $(wildcard *.lhs)
21 HS_OBJS = $(HS_SRCS:.lhs=.$(way_)o)
23 HS_IFACES= $(HS_SRCS:.lhs=.$(way_)hi)
25 #-----------------------------------------------------------------------------
26 # Setting the GHC compile options
28 SRC_HC_OPTS += -recomp -cpp -fglasgow-exts -fvia-C -Rghc-timing $(GhcLibHcOpts)
31 SRC_HC_OPTS += -static
36 WAY_p_HC_OPTS += -GPrelude
37 WAY_mr_HC_OPTS += -GPrelude
40 # Object and interface files have suffixes tagged with their ways
43 SRC_HC_OPTS += -hisuf $(way_)hi
46 # KSW 1998-12: had to increase some of the heap sizes by 2m to 6m for USP
48 Int_HC_OPTS += -H20m -fno-prune-tydecls -monly-3-regs
49 Word_HC_OPTS += -H20m -monly-3-regs
50 Foreign_HC_OPTS += -fno-prune-tydecls
51 NativeInfo_HC_OPTS += -fno-prune-tydecls
52 Dynamic_HC_OPTS += $(MAGIC_HSCPP_OPTS)
54 MAGIC_HSCPP_OPTS=-DBEGIN_FOR_GHC='-}' -DEND_FOR_GHC='{-' -DBEGIN_FOR_HUGS='{-' -DEND_FOR_HUGS='-}'
56 #-----------------------------------------------------------------------------
57 # Dependency generation
59 SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR) -optdep--include-prelude -optdep-w $(MAGIC_HSCPP_OPTS)
61 #-----------------------------------------------------------------------------
65 DLL_IMPLIB_NAME = libHSexts_imp.a
66 SRC_BLD_DLL_OPTS += --export-all --output-def=HSexts.def
67 SRC_BLD_DLL_OPTS += -lwinmm -lHSrts_imp -lHS_cbits_imp -lHS_imp -lgmp -L. -L../../rts/gmp -L../../rts -L../std -L../std/cbits
69 #-----------------------------------------------------------------------------
70 # Installation; need to install .hi files as well as libraries
72 # The interface files are put inside the $(libdir), since they
73 # might (potentially) be platform specific..
75 # override is used here because for binary distributions, datadir is
76 # set on the command line. sigh.
78 override datadir:=$(libdir)/imports/exts
81 # Files to install from here
83 INSTALL_LIBS += $(LIBRARY)
84 INSTALL_DATAS += $(HS_IFACES)
86 include $(TOP)/mk/target.mk