1 #################################################################################
5 # This file defines Make variables for the
6 # option flags for each utility program
8 # $Id: opts.mk,v 1.36 2004/08/26 20:08:54 panne Exp $
10 #################################################################################
13 # N.B. This is *NOT* the place to put extra options of ANY SORT!
16 # Exports: Define P_OPTS for the most important utility programs, P, namely
18 # AR AS CPP CTAGS C FLEX HC HSTAGS LD LINT
19 # LIT2CHANGELOG LIT2HTML LIT2LATEX LIT2PGM
20 # MKDEPENDC MKDEPENDHS MKDEPENDLIT RUNTEST
24 # For each such utility program P, this file defines
26 # $(P) The pathname to invoke the utility
27 # P_OPTS Options to pass to P
29 # P_OPTS is always defined like this:
31 # P_OPTS = SRC_P_OPTS WAY$(_way)_P_OPTS EXTRA_P_OPTS
33 # where the variables on the right hand side are set by the user or
34 # some other Makefile. They have the following intended uses:
36 # SRC_P_OPTS Source-tree options for P
37 # WAY$(_way)_P_OPTS Source-tree options for P specific to $(way)
38 # EXTRA_P_OPTS Command-line options for P
40 # and for some programs
42 # $(HcFlavour)_P_OPTS Compiler-specific options for P
43 # $($*_P_OPTS) Target specific options for P
45 # All these options should be set with
46 # thing += extra-options
47 # in case someone higher up the include hierarchy has already added some
49 # Which class of compiler are we aiming at? (GHC, NHC or HUGS)
50 ifeq "$(HcFlavour)" ""
54 #################################################################################
56 # Absolutely standard glue
58 #################################################################################
60 # All the standard gluing together, as in the comment right at the front
63 HC_OPTS = $(SRC_HC_OPTS) $(WAY$(_way)_HC_OPTS) $($*_HC_OPTS) $(EXTRA_HC_OPTS)
64 HC_POST_OPTS = $(SRC_HC_POST_OPTS) $(WAY$(_way)_HC_POST_OPTS) $($*_HC_POST_OPTS) $(EXTRA_HC_POST_OPTS)
65 HC_PRE_OPTS = $(SRC_HC_PRE_OPTS) $(WAY$(_way)_HC_PRE_OPTS) $($*_HC_PRE_OPTS) $(EXTRA_HC_PRE_OPTS)
67 ILX2IL_OPTS = $(SRC_ILX2IL_OPTS) $(WAY$(_way)_ILX2IL_OPTS) $($*_ILX2IL_OPTS) $(EXTRA_ILX2IL_OPTS)
68 ILASM_OPTS = $(SRC_ILASM_OPTS) $(WAY$(_way)_ILASM_OPTS) $($*_ILASM_OPTS) $(EXTRA_ILASM_OPTS)
70 RUNTEST_OPTS = $(SRC_RUNTEST_OPTS) $(WAY$(_way)_RUNTEST_OPTS) \
71 $($*_RUNTEST_OPTS) $(EXTRA_RUNTEST_OPTS)
73 ALEX_OPTS = $(SRC_ALEX_OPTS) $($(HcFlavour)_ALEX_OPTS) $(WAY$(_way)_ALEX_OPTS) $($*_ALEX_OPTS) $(EXTRA_ALEX_OPTS)
74 AR_OPTS = $(SRC_AR_OPTS) $(WAY$(_way)_AR_OPTS) $(EXTRA_AR_OPTS)
75 AS_OPTS = $(SRC_AS_OPTS) $(WAY$(_way)_AS_OPTS) $(EXTRA_AS_OPTS)
76 BLD_DLL_OPTS = $(SRC_BLD_DLL_OPTS) $(WAY$(_way)_BLD_DLL_OPTS) $($*_HC_OPTS) $(EXTRA_BLD_DLL_OPTS)
77 CPP_OPTS = $(SRC_CPP_OPTS) $(WAY$(_way)_CPP_OPTS) $(EXTRA_CPP_OPTS)
78 CTAGS_OPTS = $(SRC_CTAGS_OPTS) $(WAY$(_way)_CTAGS_OPTS) $(EXTRA_CTAGS_OPTS)
79 CC_OPTS = $(SRC_CC_OPTS) $(WAY$(_way)_CC_OPTS) $($*_CC_OPTS) $(EXTRA_CC_OPTS)
80 FLEX_OPTS = $(SRC_FLEX_OPTS) $(WAY$(_way)_FLEX_OPTS) $(EXTRA_FLEX_OPTS)
81 HADDOCK_OPTS = $(SRC_HADDOCK_OPTS) $(WAY$(_way)_HADDOCK_OPTS) $($*_HADDOCK_OPTS) $(EXTRA_HADDOCK_OPTS)
82 HAPPY_OPTS = $(SRC_HAPPY_OPTS) $($(HcFlavour)_HAPPY_OPTS) $(WAY$(_way)_HAPPY_OPTS) $($*_HAPPY_OPTS) $(EXTRA_HAPPY_OPTS)
83 GC_OPTS = $(SRC_GC_OPTS) $(WAY$(_way)_GC_OPTS) $($*_GC_OPTS) $(EXTRA_GC_OPTS)
84 HSTAGS_OPTS = $(SRC_HSTAGS_OPTS) $(WAY$(_way)_HSTAGS_OPTS) $(EXTRA_HSTAGS_OPTS)
85 HSC2HS_OPTS = $(SRC_HSC2HS_OPTS) $($(HcFlavour)_HSC2HS_OPTS) $(WAY$(_way)_HSC2HS_OPTS) $(EXTRA_HSC2HS_OPTS)
86 INSTALL_OPTS = $(SRC_INSTALL_OPTS) $(WAY$(_way)_INSTALL_OPTS) $(EXTRA_INSTALL_OPTS)
87 INSTALL_BIN_OPTS = $(INSTALL_OPTS) $(SRC_INSTALL_BIN_OPTS)
88 LD_OPTS = $(SRC_LD_OPTS) $(WAY$(_way)_LD_OPTS) $(EXTRA_LD_OPTS)
89 LINT_OPTS = $(SRC_LINT_OPTS) $(WAY$(_way)_LINT_OPTS) $(EXTRA_LINT_OPTS)
90 HEVEA_OPTS = $(SRC_HEVEA_OPTS) $(WAY$(_way)_HEVEA_OPTS) $(EXTRA_HEVEA_OPTS)
91 HACHA_OPTS = $(SRC_HACHA_OPTS) $(WAY$(_way)_HACHA_OPTS) $(EXTRA_HACHA_OPTS)
92 LIT2CHANGELOG_OPTS = $(SRC_LIT2CHANGELOG_OPTS) $(WAY$(_way)_LIT2CHANGELOG_OPTS) \
93 $(EXTRA_LIT2CHANGELOG_OPTS)
94 LIT2HTML_OPTS = $(SRC_LIT2HTML_OPTS) $(WAY$(_way)_LIT2HTML_OPTS) $(EXTRA_LIT2HTML_OPTS)
95 LIT2LATEX_OPTS = $(SRC_LIT2LATEX_OPTS) $(WAY$(_way)_LIT2LATEX_OPTS) $(EXTRA_LIT2LATEX_OPTS)
96 LIT2PGM_OPTS = $(SRC_LIT2PGM_OPTS) $(WAY$(_way)_LIT2PGM_OPTS) $(EXTRA_LIT2PGM_OPTS)
97 MKDEPENDC_OPTS = $(SRC_MKDEPENDC_OPTS) $(WAY$(_way)_MKDEPENDC_OPTS) $(EXTRA_MKDEPENDC_OPTS)
98 MKDEPENDHS_OPTS = $(SRC_MKDEPENDHS_OPTS) $(WAY$(_way)_MKDEPENDHS_OPTS) \
99 $(EXTRA_MKDEPENDHS_OPTS)
100 MKDEPENDLIT_OPTS = $(SRC_MKDEPENDLIT_OPTS) $(WAY$(_way)_MKDEPENDLIT_OPTS) \
101 $(EXTRA_MKDEPENDLIT_OPTS)
102 XSLTPROC_OPTS = $(WAY$(_way)_XSLTPROC_OPTS) $(EXTRA_XSLTPROC_OPTS)
103 FOP_OPTS = $(WAY$(_way)_FOP_OPTS) $(EXTRA_FOP_OPTS)
104 UNLIT_OPTS = $(SRC_UNLIT_OPTS) $(WAY$(_way)_UNLIT_OPTS) $(EXTRA_UNLIT_OPTS)
105 ZIP_OPTS = $(SRC_ZIP_OPTS) $(EXTRA_ZIP_OPTS)
107 # Version of CC_OPTS to use when GHC is the C compiler
108 GHC_CC_OPTS = $(addprefix -optc, $(CC_OPTS)) $(HC_OPTS)