1 # -----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.18 2002/02/17 20:05:35 panne Exp $
5 include $(TOP)/mk/boilerplate.mk
7 # -----------------------------------------------------------------------------
9 SUBDIRS = cbits include
42 SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude
43 SRC_HSC2HS_OPTS += -Iinclude
45 # Make sure we can get hold of regex.h
46 ifneq "$(HavePosixRegex)" "YES"
47 SRC_HC_OPTS += -Icbits/regex
48 SRC_HSC2HS_OPTS += -Icbits/regex
51 # -----------------------------------------------------------------------------
54 # ESSENTIAL, for getting reasonable performance from the I/O library:
55 GHC/IOBase_HC_OPTS = -funbox-strict-fields
57 Data/Array/Storable_HC_OPTS = -funbox-strict-fields
59 # -----------------------------------------------------------------------------
62 GHC/PrimopWrappers.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt
64 $(GHC_GENPRIMOP) --make-haskell-wrappers < $< > $@
66 boot :: GHC/PrimopWrappers.hs
68 CLEAN_FILES += GHC/PrimopWrappers.hs
70 # -----------------------------------------------------------------------------
73 GHC/Prim.$(way_)hi : GHC/Prim.hi-boot
76 ALL_PRIMS = GHC/Prim.hi $(foreach way, $(WAYS), GHC/Prim.$(way)_hi)
77 INSTALL_DATAS_WITH_DIRS += GHC/Prim.$(way_)hi
83 CLEAN_FILES += $(ALL_PRIMS)
85 SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) -traditional
87 #-----------------------------------------------------------------------------
88 # Building the library for GHCi
90 # The procedure differs from that in fptools/mk/target.mk in one way:
91 # (*) on Win32 we must split it into two, because a single .o file can't
92 # have more than 65536 relocations in it.
94 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
96 # Turn off standard rule which creates HSbase.o from LIBOBJS.
97 DONT_WANT_BASE_GHCI_LIB_RULE=YES
99 GHCI_LIBOBJS = $(HS_OBJS)
101 HSbase.o : $(GHCI_LIBOBJS)
102 $(LD) -r $(LD_X) -o HSbase1.o $(filter GHC/%, $(GHCI_LIBOBJS))
103 $(LD) -r $(LD_X) -o HSbase2.o $(filter-out GHC/%, $(GHCI_LIBOBJS))
106 INSTALL_LIBS += HSbase1.o HSbase2.o
108 endif # TARGETPLATFORM = i386-unknown-mingw32
111 # -----------------------------------------------------------------------------
113 include $(TOP)/mk/target.mk