[project @ 2004-11-14 09:50:33 by krasimir]
[ghc-hetmet.git] / ghc / lib / compat / Makefile
1 TOP=../..
2 include $(TOP)/mk/boilerplate.mk
3
4 ALL_DIRS = \
5         Data \
6         Compat \
7         Distribution \
8         Distribution/Compat \
9         cbits
10
11 LIBRARY = libghccompat.a
12
13 # Just to silence warnings
14 MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
15
16 UseGhcForCc = YES
17
18 ghc_603_plus = $(shell if (test $(GhcCanonVersion) -ge 603); then echo YES; else echo NO; fi)
19
20 ifeq "$(ghc_603_plus)" "YES"
21 # These modules are all provided in GHC 6.3+
22 EXCLUDED_SRCS += \
23         Data/Version.hs \
24         System/FilePath.hs \
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
34 endif
35
36 # Make the #includes in the stubs independent of the current location
37 SRC_HC_OPTS += -I$(FPTOOLS_TOP)/libraries
38
39 SRC_HC_OPTS +=  -fglasgow-exts
40
41 # libghccompat is needed to build ghc-pkg, which is built during 'make boot',
42 # so we must build this library during 'make boot' too.
43 # Do a recursive 'make all' after generating dependencies, because this
44 # will work with 'make -j'.
45 ifneq "$(BootingFromHc)" "YES"
46 boot :: depend
47         $(MAKE) all
48 endif
49
50 include $(TOP)/mk/target.mk