Remove Cabal modules from compat
[ghc-hetmet.git] / compat / compat.mk
1 # Settings for using the libghccompat.a library elsewhere in the build
2 # tree: this file is just included into Makefiles, see 
3 # utils/ghc-pkg/Makefile for example.
4 #
5 # This is a poor-mans package, but simpler because we don't
6 # have to deal with variations in the package support of different
7 # versions of GHC.
8
9 ifneq "$(UseStage1)" "YES"
10
11 SRC_HC_OPTS += -DUSING_COMPAT
12
13 # Use libghccompat.a:
14 SRC_HC_OPTS += -i$(GHC_COMPAT_DIR)
15 SRC_LD_OPTS += -L$(GHC_COMPAT_DIR) -lghccompat
16
17 ifeq "$(ghc_ge_607)" "YES"
18 SRC_HC_OPTS += -package directory
19 SRC_HC_OPTS += -package pretty
20 SRC_HC_OPTS += -package containers
21 endif
22
23 # And similarly for when booting from .hc files:
24 HC_BOOT_LD_OPTS += -L$(GHC_COMPAT_DIR)
25 HC_BOOT_LIBS += -lghccompat
26
27 ifeq "$(Windows)" "YES"
28 # not very nice, but required for -lghccompat on Windows
29 SRC_LD_OPTS += -lshell32
30 HC_BOOT_LIBS += -lshell32
31 endif
32
33 # This is horrible.  We ought to be able to omit the entire directory
34 # from mkDependHS.
35 SRC_MKDEPENDHS_OPTS += \
36         -optdep--exclude-module=Compat.Unicode \
37         -optdep--exclude-module=Trace.Hpc.Mix \
38         -optdep--exclude-module=Trace.Hpc.Tix \
39         -optdep--exclude-module=Trace.Hpc.Util
40
41 PACKAGE_CABAL =
42 PACKAGE_HPC   =
43
44 else
45
46 PACKAGE_CABAL = -package Cabal
47 PACKAGE_HPC   = -package hpc
48
49 endif
50