[project @ 2001-04-03 11:31:38 by sewardj]
[ghc-hetmet.git] / ghc / driver / Makefile
1 #-----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.60 2001/04/03 11:31:39 sewardj 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                "$(libdir)"                      \
24                "$(GHC_LIB_DIR)"                 \
25                "$(GHC_RUNTIME_DIR)"             \
26                "$(GHC_UTILS_DIR)"               \
27                "$(GHC_INCLUDE_DIR)"             \
28                "$(FPTOOLS_TOP_ABS)"
29
30 ghc_407_at_least = $(shell expr "$(GhcMinVersion)" \>= 7)
31 ifeq "$(ghc_407_at_least)" "1"
32 ifneq "$(mingw32_TARGET_OS)" "1"
33 SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package posix -package text
34 else
35 SRC_HC_OPTS += -fglasgow-exts -cpp -package concurrent -package text
36 endif
37 else
38 SRC_HC_OPTS += -fglasgow-exts -cpp -syslib concurrent -syslib posix -syslib misc
39 endif
40
41 SRC_HC_OPTS += -DWANT_PRETTY
42
43 all :: package.conf package.conf.inplace
44
45 HS_OBJS = Package.o PackageSrc.o Utils.o
46 HS_PROG = pkgconf
47
48 package.conf.inplace : $(HS_PROG)
49         ./$(HS_PROG) in-place $(PKGCONF_OPTS) >$@
50
51 package.conf : pkgconf
52         ./$(HS_PROG) install $(PKGCONF_OPTS) >$@
53
54 Package.o : ../utils/ghc-pkg/Package.hs
55
56 override datadir = $(libdir)
57 INSTALL_DATAS += package.conf ghc-usage.txt
58 INSTALL_PROGS += pkgconf post-install-script
59
60 CLEAN_FILES += pkgconf package.conf.inplace package.conf
61
62 # -----------------------------------------------------------------------------
63
64 include $(TOP)/mk/target.mk