98120a3aef21535c96b80552cb8c94f4165ffb3b
[ghc-hetmet.git] / ghc / lib / 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 # ghc/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 # Use libghccompat.a:
10 SRC_HC_OPTS += -i$(GHC_LIB_COMPAT_DIR)
11 SRC_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR) -lghccompat
12
13 # And similarly for when booting from .hc files:
14 HC_BOOT_LD_OPTS += -L$(GHC_LIB_COMPAT_DIR)
15 HC_BOOT_LIBS += -lghccompat
16
17 ifeq "$(Windows)" "YES"
18 # not very nice, but required for -lghccompat on Windows
19 SRC_LD_OPTS += -lshell32
20 endif
21
22 # This is horrible.  We ought to be able to omit the entire directory
23 # from mkDependHS.
24 SRC_MKDEPENDHS_OPTS += \
25         -optdep--exclude-module=Compat.RawSystem \
26         -optdep--exclude-module=Compat.Directory \
27         -optdep--exclude-module=Distribution.Compat.FilePath \
28         -optdep--exclude-module=Distribution.Compat.ReadP \
29         -optdep--exclude-module=Distribution.Extension \
30         -optdep--exclude-module=Distribution.GetOpt \
31         -optdep--exclude-module=Distribution.InstalledPackageInfo \
32         -optdep--exclude-module=Distribution.License \
33         -optdep--exclude-module=Distribution.Package \
34         -optdep--exclude-module=Distribution.ParseUtils \
35         -optdep--exclude-module=Distribution.Compiler \
36         -optdep--exclude-module=Distribution.Version \
37         -optdep--exclude-module=System.Directory.Internals