[project @ 2002-02-11 17:10:56 by simonmar]
[ghc-base.git] / Makefile
1 # -----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.12 2002/02/11 17:10:56 simonmar Exp $
3
4 TOP=..
5 include $(TOP)/mk/boilerplate.mk
6
7 # -----------------------------------------------------------------------------
8
9 SUBDIRS = cbits include
10
11 ALL_DIRS = \
12         Control \
13         Control/Concurrent \
14         Control/Monad \
15         Control/Monad/ST \
16         Data \
17         Data/Array \
18         Database \
19         Debug \
20         Debug/QuickCheck \
21         FileFormat \
22         Foreign \
23         Foreign/C \
24         Foreign/Marshal \
25         GHC \
26         Hugs \
27         Language \
28         Network \
29         NHC \
30         System \
31         System/Console \
32         System/Mem \
33         System/IO \
34         Text \
35         Text/Html \
36         Text/PrettyPrint \
37         Text/Regex \
38         Text/Show
39
40 PKG = base
41
42 SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude
43 SRC_HSC2HS_OPTS += -Iinclude
44
45 # ESSENTIAL, for getting reasonable performance from the I/O library:
46 GHC/IOBase_HC_OPTS   = -funbox-strict-fields 
47
48 # -----------------------------------------------------------------------------
49 # PrimOpWrappers
50
51 GHC/PrimopWrappers.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt
52         rm -f $@
53         $(GHC_GENPRIMOP) --make-haskell-wrappers < $< > $@
54
55 boot :: GHC/PrimopWrappers.hs
56
57 CLEAN_FILES += GHC/PrimopWrappers.hs
58
59 # -----------------------------------------------------------------------------
60 # GHC/Prim.hi-boot
61
62 GHC/Prim.$(way_)hi      : GHC/Prim.hi-boot
63         cp $< $@
64
65 ALL_PRIMS = GHC/Prim.hi $(foreach way, $(WAYS), GHC/Prim.$(way)_hi)
66
67 lib  : $(ALL_PRIMS)
68
69 boot :: $(ALL_PRIMS)
70
71 CLEAN_FILES += $(ALL_PRIMS)
72
73 SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) -traditional
74
75 # -----------------------------------------------------------------------------
76
77 include $(TOP)/mk/target.mk
78