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.
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
9 ifneq "$(UseStage1)" "YES"
11 SRC_HC_OPTS += -DUSING_COMPAT
14 SRC_HC_OPTS += -i$(GHC_COMPAT_DIR)
15 SRC_LD_OPTS += -L$(GHC_COMPAT_DIR) -lghccompat
17 # Do *not* use the installed Cabal:
18 ifeq "$(ghc_ge_603)" "YES"
19 SRC_HC_OPTS += -ignore-package Cabal
22 # And similarly for when booting from .hc files:
23 HC_BOOT_LD_OPTS += -L$(GHC_COMPAT_DIR)
24 HC_BOOT_LIBS += -lghccompat
26 ifeq "$(Windows)" "YES"
27 # not very nice, but required for -lghccompat on Windows
28 SRC_LD_OPTS += -lshell32
29 HC_BOOT_LIBS += -lshell32
32 # This is horrible. We ought to be able to omit the entire directory
34 SRC_MKDEPENDHS_OPTS += \
35 -optdep--exclude-module=Compat.RawSystem \
36 -optdep--exclude-module=Compat.Directory \
37 -optdep--exclude-module=Compat.Unicode \
38 -optdep--exclude-module=Distribution.Compat.FilePath \
39 -optdep--exclude-module=Distribution.Compat.ReadP \
40 -optdep--exclude-module=Distribution.Extension \
41 -optdep--exclude-module=Distribution.GetOpt \
42 -optdep--exclude-module=Distribution.InstalledPackageInfo \
43 -optdep--exclude-module=Distribution.License \
44 -optdep--exclude-module=Distribution.Package \
45 -optdep--exclude-module=Distribution.ParseUtils \
46 -optdep--exclude-module=Distribution.Compiler \
47 -optdep--exclude-module=Distribution.Version \
48 -optdep--exclude-module=System.Directory.Internals
54 PACKAGE_CABAL = -package Cabal