1 # line 8 "only4-ghc.ljm"
2 /* Project identification - name and version */
5 #define ProjectName The Glorious Glasgow Haskell Compilation System
7 /* ProjectVersion is something printable */
9 #define ProjectVersion 0.26
11 /* A patchlevel change is something *very minor* */
12 #ifndef ProjectPatchLevel
13 #define ProjectPatchLevel patchlevel 0
15 /* GhcBuildeeVersion is something CPP-testable (ProjectVersion * 100) */
16 #ifndef GhcBuildeeVersion
17 #define GhcBuildeeVersion 26
19 # line 29 "only4-ghc.ljm"
20 /* state of the source world */
21 GHC_DRIVERSRC = $(TOP)/ghc/driver
22 GHC_COMPILERSRC = $(TOP)/ghc/compiler
23 GHC_RUNTIMESRC = $(TOP)/ghc/runtime
24 GHC_LIBSRC = $(TOP)/ghc/lib
25 GHC_INCLUDESRC = $(TOP)/ghc/includes
26 GHC_UTILSRC = $(TOP)/ghc/utils
27 GHC_BOOKSRC = $(TOP)/ghc/book
28 # line 41 "only4-ghc.ljm"
29 #ifndef GhcIncludesDir
30 #define GhcIncludesDir $(GHC_INCLUDESRC)
32 GHC_INCLUDES = GhcIncludesDir
33 # line 51 "only4-ghc.ljm"
34 #ifndef AllProjectsGhcOpts
35 #define AllProjectsGhcOpts /*none*/
38 #ifndef PlatformGhcOpts
39 #define PlatformGhcOpts /*none*/
42 #if HaskellCompilerType == HC_CHALMERS_HBC
45 # if HaskellCompilerType == HC_ROJEMO_NHC
46 GHC_RTS_STYLE = 'ghc' /* wrong, but more likely to trigger something */
52 #ifndef ProjectGhcOpts
53 #define ProjectGhcOpts -hi-diffs -dcore-lint -link-chk
54 #endif /* ! ProjectGhcOpts */
57 #define SetupGhcOpts /*none*/
60 GenerateOptionsMakeVars(GHC,OPTS,AllProjectsGhcOpts,PlatformGhcOpts,ProjectGhcOpts,SetupGhcOpts)
62 GHCFLAGS=$(GLUED_CPP_DEFINES) $(GLUED_GHC_OPTS)
63 # line 95 "only4-ghc.ljm"
64 /* build York interpreter as well as Glasgow compiler
66 #ifndef BuildYorkInterpreter
67 #define BuildYorkInterpreter NO
70 /* incorporate Semantique strictness analyser into the compiler;
71 it analyses, but the info generated is *UNUSED* :-(
73 #ifndef UseSemantiqueStrictnessAnalyser
74 #define UseSemantiqueStrictnessAnalyser NO
76 # line 116 "only4-ghc.ljm"
77 /* defaults for which pieces should be installed */
78 /* ToDo: possibly obsolete */
79 #ifndef DoInstallGHCSystem
80 #define DoInstallGHCSystem YES
81 #endif /* DoInstallGHCSystem */
82 # line 124 "only4-ghc.ljm"
83 /* ------------------------------------------------------------------ */
84 /* compiler-proper subsystem:
85 the lib/data bits are installed w/ a version number as well
88 #ifndef InstBinDir_GHC
90 # define InstBinDir_GHC $(exec_prefix_GHC)/bin/`/usr/local/gnu/bin/hw_os`
92 # define InstBinDir_GHC $(exec_prefix_GHC)/bin
96 /* scripts are platform-independent */
97 #ifndef InstScriptDir_GHC
98 #define InstScriptDir_GHC $(exec_prefix_GHC)/bin
101 /* main "internally-used-by-GHC" stuff */
102 #ifndef InstLibDir_GHC
103 #define InstLibDir_GHC $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)/$(HOSTPLATFORM)
106 /* "data" is defined (by WDP) to be platform-independent library stuff */
107 #ifndef InstDataDir_GHC
108 #define InstDataDir_GHC $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)
111 prefix_GHC = InstRootDir_GHC /* set by configure */
112 exec_prefix_GHC = InstBinRootDir_GHC /* ditto */
113 INSTBINDIR_GHC = InstBinDir_GHC
114 INSTSCRIPTDIR_GHC = InstScriptDir_GHC
115 INSTLIBDIR_GHC = InstLibDir_GHC
116 INSTDATADIR_GHC = InstDataDir_GHC
117 # line 183 "only4-ghc.ljm"
118 #ifndef GhcDriverInstallName
119 #define GhcDriverInstallName ghc
120 #endif /* ! GhcDriverInstallName */
121 GHC_DRIVER_INST_NAME = GhcDriverInstallName
122 # line 197 "only4-ghc.ljm"
123 /* ghc: std driver for compilation system */
125 #define GhcDriverCmd $(GHC_DRIVERSRC)/ghc
128 /* macro to make sure it has been built */
129 #ifndef GhcDriverNeededHere
130 #define GhcDriverNeededHere(target) \
131 __SomeUtilNeededHere(target,$(GHC),$(GHC_DRIVERSRC),all)
134 /* could be GHC_DRIVER, but GHC is its common name */
136 # line 218 "only4-ghc.ljm"
138 #define HsCppCmd $(GHC_HSCPPSRC)/hscpp
141 #ifndef HsCppNeededHere
142 #define HsCppNeededHere(target) \
143 __SomeUtilNeededHere(target,$(GHC_HSCPP),$(GHC_HSCPPSRC),hscpp)
146 GHC_HSCPP = HsCppCmd $(ALLPROJ_CPP_DEFINES)
147 GHC_HSCPPSRC = $(GHC_UTILSRC)/hscpp
148 # line 233 "only4-ghc.ljm"
150 #define HsParserCmd $(GHC_HSPSRC)/hsp
153 #ifndef HsParserNeededHere
154 #define HsParserNeededHere(target) \
155 __SomeUtilNeededHere(target,$(GHC_HSP),$(GHC_HSPSRC),hsp)
156 #endif /* HsParserNeededHere */
158 GHC_HSP = HsParserCmd
159 GHC_HSPSRC = $(GHC_HSCSRC)
160 # line 248 "only4-ghc.ljm"
161 #ifndef HsCompilerCmd
162 #define HsCompilerCmd $(GHC_HSCSRC)/hsc
165 #ifndef HsCompilerNeededHere
166 #define HsCompilerNeededHere(target) \
167 __SomeUtilNeededHere(target,$(GHC_HSC),$(GHC_HSCSRC),hsc)
168 #endif /* HsCompilerNeededHere */
170 GHC_HSC = HsCompilerCmd
171 GHC_HSCSRC = $(GHC_COMPILERSRC)
172 # line 263 "only4-ghc.ljm"
174 #define SysManCmd $(GHC_RUNTIMESRC)/gum/SysMan
177 #ifndef SysManNeededHere
178 #define SysManNeededHere(target) \
179 __SomeUtilNeededHere(target,$(GHC_SYSMAN),$(GHC_SYSMANSRC),gum/SysMan)
180 #endif /* SysManNeededHere */
182 GHC_SYSMAN = SysManCmd
183 GHC_SYSMANSRC = $(GHC_RUNTIMESRC)
184 # line 318 "only4-ghc.ljm"
185 /* NON-OPTIMISING C COMPILATION: ==================================
187 We can use GCC 2.n for the non-optimising (normal) .hc C
188 compilation [use it if we have it]
190 #ifndef GhcUseGccForDebuggingAsm
192 #define GhcUseGccForDebuggingAsm YES
194 #define GhcUseGccForDebuggingAsm NO
198 #ifndef GhcDebuggingHighLevelAsmCmd
199 #if GhcUseGccForDebuggingAsm == YES
200 #define GhcDebuggingHighLevelAsmCmd WhatGccIsCalled
202 #define GhcDebuggingHighLevelAsmCmd $(CC)
204 #endif /* GhcDebuggingHighLevelAsmCmd */
205 GHC_DEBUG_HILEV_ASM = GhcDebuggingHighLevelAsmCmd
206 # line 342 "only4-ghc.ljm"
207 /* OPTIMISING C COMPILATION (regs, etc): ==========================
209 Must use GCC 2.n for this
210 compilation [OFF by default]
212 /* We have GCC, which is necessary for optimising the Haskell
215 #ifndef GhcUseGccForOptAsm
217 #define GhcUseGccForOptAsm YES
219 #define GhcUseGccForOptAsm NO
223 #ifndef GhcOptHighLevelAsmCmd
224 #if GhcUseGccForOptAsm == YES
225 #define GhcOptHighLevelAsmCmd WhatGccIsCalled
226 GHC_GCC_IS_AVAILABLE = 1
228 GHC_GCC_IS_AVAILABLE = 0
230 #endif /* GhcOptHighLevelAsmCmd */
231 GHC_OPT_HILEV_ASM = GhcOptHighLevelAsmCmd