1 # -----------------------------------------------------------------------------
2 # $Id: ghcconfig.mk.in,v 1.3 1996/11/22 14:12:39 simonm Exp $
4 # This stuff should be split into separate files: that which can be
5 # messed with, and that which can't.
7 # =============================================================================
10 WithGhcHc = @WithGhcHc@
11 WithGhcHcType = @WithGhcHcType@
13 # Override default haskell compiler if required
14 ifneq ($(WithGhcHcType),HC_UNSPECIFIED)
16 HaskellCompilerType = $(WithGhcHcType)
19 GhcWithHscBuiltViaC = @GhcWithHscBuiltViaC@
20 GhcWithHscOptimised = @GhcWithHscOptimised@
21 GhcWithHscDebug = @GhcWithHscDebug@
22 GhcBuilderVersion = @GhcBuilderVersion@
23 GhcWithRegisterised = @GhcWithRegisterised@
24 GhcWithNativeCodeGen = @GhcWithNativeCodeGen@
26 GhcWithDeforester = @GhcWithDeforester@
27 GhcWithReadline = @GhcWithReadline@
28 GhcWithSockets = @GhcWithSockets@
30 # =====================================================================
31 # Utilties for ghc project
33 ifeq ($(GhcWithHscOptimised), YES)
39 ifeq ($(HaskellCompilerType), HC_CHALMERS_HBC)
40 PROJECT_HC_OPTS = $(__hsc_opt) -fpbu
42 ifeq ($(HaskellCompilerType), HC_GLASGOW_GHC)
43 PROJECT_HC_OPTS = $(__hsc_opt) -hi-diffs -link-chk
45 ifeq ($(HaskellCompilerType),HC_ROJEMO_NHC)
53 ifeq ($(HaveGcc), YES)
59 PROJECT_MSUB_OPTS = -f $(TOP)/ghc/mk/ghcconfig.mk -f $(TOP)/ghc/mk/buildinfo.mk -f $(TOP)/ghc/mk/site-ghc.mk
61 #-----------------------------------------------------------------------------
64 ifdef UseInstalledUtils
65 MKDEPENDHS = mkdependHS
67 MKDEPENDHS = $(MKDEPENDHSSRC)/mkdependHS
68 MKDEPENDHSSRC = $(GHC_UTILSRC)/mkdependHS
71 # Temp until we bootstrap to 2.01 properly
73 MKDEPENDHS = mkdependHS
75 MKDEPENDHS = mkdependHS-1.2
78 #-----------------------------------------------------------------------------
81 UNLIT = $(GHC_UNLITSRC)/unlit
83 #ToDo: unlitNeededHere
86 GHC_UNLITSRC = $(GHC_UTILSRC)/unlit
88 #-----------------------------------------------------------------------------
91 ifdef UseInstalledUtils
94 HSTAGS = $(HSTAGSSRC)/hstags
95 HSTAGSSRC = $(GHC_UTILSRC)/hstags
99 $(ALL_PROJECTS_HSTAGS_OPTS) \
100 $(PLATFORM_HSTAGS_OPTS) \
101 $(PROJECT_HSTAGS_OPTS) \
105 HSTAGSFLAGS = $(GLUED_HSTAGS_OPTS)
107 #-----------------------------------------------------------------------------
110 ifdef UseInstalledUtils
113 UGEN = $(UGENSRC)/ugen
114 UGENSRC = $(GHC_UTILSRC)/ugen
117 #-----------------------------------------------------------------------------
118 # Extra things ``only for'' for the ghc project
120 PROJECTNAME = The Glorious Glasgow Haskell Compilation System
121 PROJECTVERSION = 2.01
122 PROJECTPATCHLEVEL = patchlevel 0
123 GhcBuildeeVersion = 201
125 GHC_DRIVERSRC = $(TOP)/ghc/driver
126 GHC_COMPILERSRC = $(TOP)/ghc/compiler
127 GHC_RUNTIMESRC = $(TOP)/ghc/runtime
128 GHC_LIBSRC = $(TOP)/ghc/lib
129 GHC_INCLUDESRC = $(TOP)/ghc/includes
130 GHC_UTILSRC = $(TOP)/ghc/utils
131 GHC_BOOKSRC = $(TOP)/ghc/book
133 GHC_INCLUDES = $(GHC_INCLUDESRC)
135 ifeq ($(HaskellCompilerType), HC_CHALMERS_HBC)
136 GHC_RTS_STYLE = 'hbc'
138 ifeq ($(HaskellCompilerType), HC_ROJEMO_NHC)
139 GHC_RTS_STYLE = 'ghc' /* wrong, but more likely to trigger something */
141 GHC_RTS_STYLE = 'ghc'
145 PROJECT_GHC_OPTS = -hi-diffs -dcore-lint -link-chk
148 $(ALL_PROJECTS_GHC_OPTS) \
149 $(PLATFORM_GHC_OPTS) \
150 $(PROJECT_GHC_OPTS) \
154 GHCFLAGS=$(GLUED_CPP_DEFINES) $(GLUED_GHC_OPTS)
156 #-----------------------------------------------------------------------------
159 BuildYorkInterpreter = NO
160 UseSemantiqueStrictnessAnalyser = NO
162 #-----------------------------------------------------------------------------
163 # Installation: whether to, where to, what to
165 AT_GLASGOW = @AT_GLASGOW@
167 ifeq ($(AT_GLASGOW),1)
168 GHC_DRIVER_INST_NAME = ghc-$(PROJECTVERSION)
170 GHC_DRIVER_INST_NAME = ghc
173 # Make sure we install things with group 'grasp' at Glasgow
175 ifeq ($(AT_GLASGOW),1)
179 # At Glasgow, we would rather the installed binaries were stripped.
180 # (Delete if you feel otherwise.)
184 # Installation directories --------------------------------------------------
186 prefix_GHC = @prefix@
187 exec_prefix_GHC = @exec_prefix@
189 ifeq ($(AT_GLASGOW), 1)
190 INSTBINDIR_GHC = $(exec_prefix_GHC)/bin/`/usr/local/gnu/bin/hw_os`
192 INSTBINDIR_GHC = $(exec_prefix_GHC)/bin
195 INSTSCRIPDIR_GHC = $(exec_prefix_GHC)/bin
196 INSTLIBDIR_GHC = $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)/$(HOSTPLATFORM)
197 INSTDATADIR_GHC = $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)
198 INSTIMPORTSDIR_GHC = $(INSTDATADIR_GHC)/imports
200 # -----------------------------------------------------------------------------
201 # Where to find the programs for the various phases
203 GHC = $(GHC_DRIVERSRC)/ghc
204 GHC_HSCPP = $(GHC_HSCPPSRC)/hscpp $(ALLPROJ_CPP_DEFINES)
205 GHC_HSCPPSRC = $(GHC_UTILSRC)/hscpp
206 GHC_HSP = $(GHC_HSPSRC)/hsp
207 GHC_HSPSRC = $(GHC_HSCSRC)
208 GHC_HSC = $(GHC_HSCSRC)/hsc
209 GHC_HSCSRC = $(GHC_COMPILERSRC)
210 GHC_SYSMAN = $(GHC_RUNTIMESRC)/gum/SysMan
211 GHC_SYSMANSRC = $(GHC_RUNTIMESRC)
213 #-----------------------------------------------------------------------------
214 # Stuff for the C-compiling phase in particular...
216 # NON-OPTIMISING C COMPILATION: =================================
218 ifeq ($(HaveGcc), YES)
219 GhcUseGccForDebuggingAsm = YES
220 GHC_DEBUG_HILEV_ASM = $(WhatGccIsCalled)
222 GhcUseGccForDebuggingAsm = NO
223 GHC_DEBUG_HILEV_ASM = $(CC)
226 # OPTIMISING C COMPILATION (regs, etc): ==========================
228 ifeq ($(HaveGcc), YES)
229 GhcUseGccForOptAsm = YES
230 GHC_OPT_HILEV_ASM = $(WhatGccIsCalled)
231 GHC_GCC_IS_AVAILABLE = 1
233 GhcUseGccForOptAsm = NO
234 GHC_OPT_HILEV_ASM = $(CC)
235 GHC_GCC_IS_AVAILABLE = 0