1 # -----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.16 2002/02/13 11:51:40 simonmar Exp $
5 include $(TOP)/mk/boilerplate.mk
7 # -----------------------------------------------------------------------------
9 SUBDIRS = cbits include
42 ifneq "$(HavePosixRegex)" "YES"
43 EXCLUDED_SRCS += Text/Regex/Posix.hsc Text/Regex.hs
46 SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude
47 SRC_HSC2HS_OPTS += -Iinclude
49 # -----------------------------------------------------------------------------
52 # ESSENTIAL, for getting reasonable performance from the I/O library:
53 GHC/IOBase_HC_OPTS = -funbox-strict-fields
55 Data/Array/Storable_HC_OPTS = -funbox-strict-fields
57 # -----------------------------------------------------------------------------
60 GHC/PrimopWrappers.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt
62 $(GHC_GENPRIMOP) --make-haskell-wrappers < $< > $@
64 boot :: GHC/PrimopWrappers.hs
66 CLEAN_FILES += GHC/PrimopWrappers.hs
68 # -----------------------------------------------------------------------------
71 GHC/Prim.$(way_)hi : GHC/Prim.hi-boot
74 ALL_PRIMS = GHC/Prim.hi $(foreach way, $(WAYS), GHC/Prim.$(way)_hi)
80 CLEAN_FILES += $(ALL_PRIMS)
82 SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) -traditional
84 #-----------------------------------------------------------------------------
85 # Building the library for GHCi
87 # The procedure differs from that in fptools/mk/target.mk in one way:
88 # (*) on Win32 we must split it into two, because a single .o file can't
89 # have more than 65536 relocations in it.
91 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
93 # Turn off standard rule which creates HSbase.o from LIBOBJS.
94 DONT_WANT_BASE_GHCI_LIB_RULE=YES
96 GHCI_LIBOBJS = $(HS_OBJS)
98 HSbase.o : $(GHCI_LIBOBJS)
99 $(LD) -r $(LD_X) -o HSbase1.o $(filter GHC/%, $(GHCI_LIBOBJS))
100 $(LD) -r $(LD_X) -o HSbase2.o $(filter-out GHC/%, $(GHCI_LIBOBJS))
103 INSTALL_LIBS += HSbase1.o HSbase2.o
105 endif # TARGETPLATFORM = i386-unknown-mingw32
108 # -----------------------------------------------------------------------------
110 include $(TOP)/mk/target.mk