2 include $(TOP)/mk/boilerplate.mk
12 LIBRARY = libghccompat.a
14 # Just to silence warnings
15 MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
19 ghc_603_plus = $(shell if (test $(GhcCanonVersion) -ge 603); then echo YES; else echo NO; fi)
21 ifeq "$(ghc_603_plus)" "YES"
22 # These modules are all provided in GHC 6.3+
25 Distribution/Compat/Error.hs \
26 Distribution/Compat/ReadP.hs \
27 Distribution/Extension.hs \
28 Distribution/InstalledPackageInfo.hs \
29 Distribution/License.hs \
30 Distribution/Package.hs \
31 Distribution/ParseUtils.hs \
32 Distribution/Setup.hs \
33 Distribution/Version.hs
36 # Some explicit dependencies
37 System/FilePath.$(way_)o : $(FPTOOLS_TOP)/libraries/base/System/FilePath.hs
38 Distribution/Compat/Error.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compat/Error.hs
39 Distribution/Compat/ReadP.$(way_) : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compat/ReadP.hs
40 Distribution/Extension.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Extension.hs
41 Distribution/InstalledPackageInfo.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/InstalledPackageInfo.hs
42 Distribution/License.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/License.hs
43 Distribution/Package.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Package.hs
44 Distribution/ParseUtils.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/ParseUtils.hs
45 Distribution/Setup.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Setup.hs
46 Distribution/Version.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Version.hs
48 # Make the #includes in the stubs independent of the current location
49 SRC_HC_OPTS += -I$(FPTOOLS_TOP)/libraries
51 SRC_HC_OPTS += -fglasgow-exts -no-recomp
53 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
54 Compat/Directory_HC_OPTS += -\#include shlobj.h
57 # libghccompat is needed to build ghc-pkg, which is built during 'make boot',
58 # so we must build this library during 'make boot' too.
59 # Do a recursive 'make all' after generating dependencies, because this
60 # will work with 'make -j'.
61 ifneq "$(BootingFromHc)" "YES"
66 include $(TOP)/mk/target.mk