1 # -----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.22 2002/03/25 15:49:26 sof 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 SRC_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 #-----------------------------------------------------------------------------
69 # Building the library for GHCi
71 # The procedure differs from that in fptools/mk/target.mk in one way:
72 # (*) on Win32 we must split it into two, because a single .o file can't
73 # have more than 65536 relocations in it.
75 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
77 # Turn off standard rule which creates HSbase.o from LIBOBJS.
78 DONT_WANT_STD_GHCI_LIB_RULE=YES
80 GHCI_LIBOBJS = $(HS_OBJS)
82 INSTALL_LIBS += HSbase1.o HSbase2.o
84 endif # TARGETPLATFORM = i386-unknown-mingw32
87 # -----------------------------------------------------------------------------
89 include $(TOP)/mk/target.mk
91 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
92 HSbase.o : $(GHCI_LIBOBJS)
93 $(LD) -r $(LD_X) -o HSbase1.o $(filter GHC/%, $(GHCI_LIBOBJS))
94 $(LD) -r $(LD_X) -o HSbase2.o $(filter-out GHC/%, $(GHCI_LIBOBJS))
96 endif # TARGETPLATFORM = i386-unknown-mingw32