[project @ 2001-06-27 13:16:30 by rrt]
[ghc-hetmet.git] / ghc / driver / Makefile
1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.65 2001/06/12 17:08:11 simonmar Exp $
3 #
4
5 TOP=..
6 CURRENT_DIR=ghc/driver
7 include $(TOP)/mk/boilerplate.mk
8
9 # hack for ghci-inplace script, see below
10 INSTALLING=1
11
12 ifeq "$(INSTALLING)" "1"        
13 SUBDIRS = mangler split ghc ghci
14 endif
15
16 # -----------------------------------------------------------------------------
17 # package configuration files...
18
19 PKGCONF_OPTS = "$(TARGETPLATFORM)"              \
20                "$(CURRENT_DIR)"                 \
21                "$(HaveLibGmp)"                  \
22                "$(LibsReadline)"                \
23                "$(GHC_LIB_DIR)"                 \
24                "$(GHC_RUNTIME_DIR)"             \
25                "$(GHC_UTILS_DIR)"               \
26                "$(GHC_INCLUDE_DIR)"
27
28 ghc_407_at_least = $(shell expr "$(GhcVersion)" \>= 4.07)
29 ifeq "$(ghc_407_at_least)" "1"
30 ifneq "$(mingw32_TARGET_OS)" "1"
31 SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package posix -package text
32 else
33 SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package text
34 endif
35 else
36 SRC_HC_OPTS += -fglasgow-exts -cpp -syslib concurrent -syslib posix -syslib misc
37 endif
38
39 SRC_HC_OPTS += -DWANT_PRETTY
40
41 all :: package.conf package.conf.inplace
42
43 HS_OBJS = Package.o PackageSrc.o Utils.o
44 HS_PROG = pkgconf
45
46 package.conf.inplace : $(HS_PROG)
47         ./$(HS_PROG) in-place $(PKGCONF_OPTS) >$@
48
49 package.conf : pkgconf
50         ./$(HS_PROG) install $(PKGCONF_OPTS) >$@
51
52 Package.o : ../utils/ghc-pkg/Package.hs
53
54 override datadir = $(libdir)
55 INSTALL_DATAS += package.conf ghc-usage.txt
56
57 CLEAN_FILES += Main.hi pkgconf package.conf.inplace package.conf
58
59 # -----------------------------------------------------------------------------
60
61 include $(TOP)/mk/target.mk