merge upstream HEAD
[ghc-hetmet.git] / libraries / Makefile.local
1 # Local GHC-build-tree customization for Cabal makefiles.  We want to build
2 # libraries using flags that the user has put in build.mk/validate.mk and
3 # appropriate flags for Mac OS X deployment targets.
4
5 # Careful here: including boilerplate.mk breaks things, because paths.mk and
6 # opts.mk overrides some of the variable settings in the Cabal Makefile, so
7 # we just include config.mk and custom-settings.mk.
8 include ../defineTOP.mk
9 SAVE_GHC := $(GHC)
10 SAVE_AR  := $(AR)
11 SAVE_LD  := $(LD)
12 include $(TOP)/mk/config.mk
13 include $(TOP)/mk/custom-settings.mk
14 GHC := $(SAVE_GHC)
15 AR  := $(SAVE_AR)
16 LD  := $(SAVE_LD)
17
18 # We want all warnings on
19 GhcLibHcOpts += -Wall
20
21 # Cabal has problems with deprecated flag warnings, as it needs to pass
22 # deprecated flags in pragmas in order to support older GHCs. Thus for
23 # now at least we just disable them completely.
24 GhcLibHcOpts += -fno-warn-deprecated-flags
25
26 ifeq "$(filter-out Win32-% dph%,$(package))" ""
27 # XXX We are one of the above list, i.e. we are a package that is not
28 # yet warning-clean. Thus turn warnings off for now so that validate
29 # goes through.
30 GhcLibHcOpts += -w
31 endif
32
33 # Now add flags from the GHC build system to the Cabal build:
34 GHC_OPTS    += $(SRC_HC_OPTS)
35 GHC_OPTS    += $(GhcLibHcOpts)
36
37 include $(TOP)/mk/bindist.mk
38