1 # -----------------------------------------------------------------------------
2 # $Id: ghcconfig.mk.in,v 1.2 1996/11/21 16:48:02 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 SETUP_HC_OPTS = $(__hsc_opt) -fpbu
42 ifeq ($(HaskellCompilerType), HC_GLASGOW_GHC)
43 SETUP_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) \
102 $(SETUP_HSTAGS_OPTS) \
106 HSTAGSFLAGS = $(GLUED_HSTAGS_OPTS)
108 #-----------------------------------------------------------------------------
111 ifdef UseInstalledUtils
114 UGEN = $(UGENSRC)/ugen
115 UGENSRC = $(GHC_UTILSRC)/ugen
118 #-----------------------------------------------------------------------------
119 # Extra things ``only for'' for the ghc project
121 PROJECTNAME = The Glorious Glasgow Haskell Compilation System
122 PROJECTVERSION = 2.01
123 PROJECTPATCHLEVEL = patchlevel 0
124 GhcBuildeeVersion = 201
126 GHC_DRIVERSRC = $(TOP)/ghc/driver
127 GHC_COMPILERSRC = $(TOP)/ghc/compiler
128 GHC_RUNTIMESRC = $(TOP)/ghc/runtime
129 GHC_LIBSRC = $(TOP)/ghc/lib
130 GHC_INCLUDESRC = $(TOP)/ghc/includes
131 GHC_UTILSRC = $(TOP)/ghc/utils
132 GHC_BOOKSRC = $(TOP)/ghc/book
134 GHC_INCLUDES = $(GHC_INCLUDESRC)
136 ifeq ($(HaskellCompilerType), HC_CHALMERS_HBC)
137 GHC_RTS_STYLE = 'hbc'
139 ifeq ($(HaskellCompilerType), HC_ROJEMO_NHC)
140 GHC_RTS_STYLE = 'ghc' /* wrong, but more likely to trigger something */
142 GHC_RTS_STYLE = 'ghc'
146 PROJECT_GHC_OPTS = -hi-diffs -dcore-lint -link-chk
149 $(ALL_PROJECTS_GHC_OPTS) \
150 $(PLATFORM_GHC_OPTS) \
151 $(PROJECT_GHC_OPTS) \
156 GHCFLAGS=$(GLUED_CPP_DEFINES) $(GLUED_GHC_OPTS)
158 #-----------------------------------------------------------------------------
161 BuildYorkInterpreter = NO
162 UseSemantiqueStrictnessAnalyser = NO
164 #-----------------------------------------------------------------------------
165 # Installation: whether to, where to, what to
167 AT_GLASGOW = @AT_GLASGOW@
169 ifeq ($(AT_GLASGOW),1)
170 GHC_DRIVER_INST_NAME = ghc-$(PROJECTVERSION)
172 GHC_DRIVER_INST_NAME = ghc
175 # Make sure we install things with group 'grasp' at Glasgow
177 ifeq ($(AT_GLASGOW),1)
181 # At Glasgow, we would rather the installed binaries were stripped.
182 # (Delete if you feel otherwise.)
186 # Installation directories --------------------------------------------------
188 prefix_GHC = @prefix@
189 exec_prefix_GHC = @exec_prefix@
191 ifeq ($(AT_GLASGOW), 1)
192 INSTBINDIR_GHC = $(exec_prefix_GHC)/bin/`/usr/local/gnu/bin/hw_os`
194 INSTBINDIR_GHC = $(exec_prefix_GHC)/bin
197 INSTSCRIPDIR_GHC = $(exec_prefix_GHC)/bin
198 INSTLIBDIR_GHC = $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)/$(HOSTPLATFORM)
199 INSTDATADIR_GHC = $(prefix_GHC)/lib/ghc/$(PROJECTVERSION)
200 INSTIMPORTSDIR_GHC = $(INSTDATADIR_GHC)/imports
202 # -----------------------------------------------------------------------------
203 # Where to find the programs for the various phases
205 GHC = $(GHC_DRIVERSRC)/ghc
206 GHC_HSCPP = $(GHC_HSCPPSRC)/hscpp $(ALLPROJ_CPP_DEFINES)
207 GHC_HSCPPSRC = $(GHC_UTILSRC)/hscpp
208 GHC_HSP = $(GHC_HSPSRC)/hsp
209 GHC_HSPSRC = $(GHC_HSCSRC)
210 GHC_HSC = $(GHC_HSCSRC)/hsc
211 GHC_HSCSRC = $(GHC_COMPILERSRC)
212 GHC_SYSMAN = $(GHC_RUNTIMESRC)/gum/SysMan
213 GHC_SYSMANSRC = $(GHC_RUNTIMESRC)
215 #-----------------------------------------------------------------------------
216 # Stuff for the C-compiling phase in particular...
218 # NON-OPTIMISING C COMPILATION: =================================
220 ifeq ($(HaveGcc), YES)
221 GhcUseGccForDebuggingAsm = YES
222 GHC_DEBUG_HILEV_ASM = $(WhatGccIsCalled)
224 GhcUseGccForDebuggingAsm = NO
225 GHC_DEBUG_HILEV_ASM = $(CC)
228 # OPTIMISING C COMPILATION (regs, etc): ==========================
230 ifeq ($(HaveGcc), YES)
231 GhcUseGccForOptAsm = YES
232 GHC_OPT_HILEV_ASM = $(WhatGccIsCalled)
233 GHC_GCC_IS_AVAILABLE = 1
235 GhcUseGccForOptAsm = NO
236 GHC_OPT_HILEV_ASM = $(CC)
237 GHC_GCC_IS_AVAILABLE = 0