Skip to content
Newer
Older
100644 845 lines (705 sloc) 28.7 KB
d7fefe2 [project @ 2000-05-31 00:55:10 by chak]
chak authored May 31, 2000
1 # -*-makefile-*-
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
2 # @configure_input@
3 #
54dd8d9 [project @ 1999-12-07 11:16:53 by simonmar]
simonmar authored Dec 7, 1999
4 ################################################################################
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
5 #
f302d61 [project @ 2001-11-27 12:29:44 by simonmar]
simonmar authored Nov 27, 2001
6 # config.mk.in
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
7 #
f302d61 [project @ 2001-11-27 12:29:44 by simonmar]
simonmar authored Nov 27, 2001
8 # This file supplies defaults for many tweakable build configuration
9 # options. Some of the defaults are filled in by the autoconf-generated
10 # configure script.
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
11 #
f302d61 [project @ 2001-11-27 12:29:44 by simonmar]
simonmar authored Nov 27, 2001
12 # DO NOT EDIT THIS FILE!
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
13 #
f302d61 [project @ 2001-11-27 12:29:44 by simonmar]
simonmar authored Nov 27, 2001
14 # - config.mk is auto-generated from config.mk.in by configure.
926ae90 @igfoo Make our install variables etc compliant with GNU standards; fixes #1924
igfoo authored Aug 14, 2009
15 # If you edit config.mk your changes will be spammed.
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
16 #
f302d61 [project @ 2001-11-27 12:29:44 by simonmar]
simonmar authored Nov 27, 2001
17 # - Settings in this file may be overriden by giving replacement
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored Apr 2, 2002
18 # definitions in build.mk. See build.mk.sample for a good
19 # starting point for a build.mk file.
20 #
21 # If you don't have a build.mk file then you get defaults for everything.
22 # The defaults should provide a reasonable vanilla build.
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
23
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
24 # TOP: the top of the fptools hierarchy, absolute path.
25 # On Windows this is a c:/foo/bar style path.
26 TOP = @hardtop@
0dca79e [project @ 1997-06-10 19:05:39 by sof]
sof authored Jun 10, 1997
27
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
28 include $(TOP)/mk/project.mk
0dca79e [project @ 1997-06-10 19:05:39 by sof]
sof authored Jun 10, 1997
29
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
30 ################################################################################
31 #
32 # Global configuration options
33 #
34 ################################################################################
35
5002727 [project @ 2001-03-23 16:36:20 by simonmar]
simonmar authored Mar 23, 2001
36 # BootingFromHc - build GHC and the libraries from .hc files?
b5f2a02 @simonmar remove --enable-hc-boot-unregisterised (implied by --enable-hc-boot now)
simonmar authored Sep 8, 2009
37 # (unregisterised only)
5002727 [project @ 2001-03-23 16:36:20 by simonmar]
simonmar authored Mar 23, 2001
38 BootingFromHc = @BootingFromHc@
39
eb5ecfb @igfoo Makefile tweak
igfoo authored May 2, 2009
40 NO_INCLUDE_DEPS = NO
41 NO_INCLUDE_PKGDATA = NO
42
f38871f @igfoo Don't build latex docs by default
igfoo authored Sep 6, 2008
43 # Should we build latex docs?
44 LATEX_DOCS = NO
45
15575cf @mchakravarty Add configure option --with-macos-deployment-target
mchakravarty authored Feb 19, 2008
46 # Mac OS X deployment target (to cross-compile for older OS versions)
47 #
5b846fa @mchakravarty Mac OS X deployment target: piping opts through Makefiles
mchakravarty authored Feb 21, 2008
48 MACOSX_DEPLOYMENT_VERSION = @MACOSX_DEPLOYMENT_VERSION@
49 MACOSX_DEPLOYMENT_SDK = @MACOSX_DEPLOYMENT_SDK@
50
51 ifneq "$(MACOSX_DEPLOYMENT_VERSION)" ""
52 MACOSX_DEPLOYMENT_CC_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
9f592bb @mchakravarty Fix fwrite$UNIX2003 symbols when cross-compiling for Tiger
mchakravarty authored May 26, 2008
53 -isysroot $(MACOSX_DEPLOYMENT_SDK) \
54 --no-builtin-fprintf
5b846fa @mchakravarty Mac OS X deployment target: piping opts through Makefiles
mchakravarty authored Feb 21, 2008
55 MACOSX_DEPLOYMENT_LD_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
56 -Wl,-syslibroot,$(MACOSX_DEPLOYMENT_SDK)
57 # We don't extend SRC_CC_OPTS and friends here directly, as (a) they may get
58 # overwritten in build.mk and (b) we must not use the deployment options in
59 # stage 1 or we get a linker error if the bootstrap compiler is for a more
60 # recent OS version.
9f592bb @mchakravarty Fix fwrite$UNIX2003 symbols when cross-compiling for Tiger
mchakravarty authored May 26, 2008
61 #
62 # We need --no-builtin-fprintf, as the use of the builtin function optimisation
63 # for fprintf together with #include "PosixSource" in the RTS leads to the
64 # use of fwrite$UNIX2003 (with GCC 4.0.1 on Mac OS X 10.5.2).
5b846fa @mchakravarty Mac OS X deployment target: piping opts through Makefiles
mchakravarty authored Feb 21, 2008
65 endif
15575cf @mchakravarty Add configure option --with-macos-deployment-target
mchakravarty authored Feb 19, 2008
66
54dd8d9 [project @ 1999-12-07 11:16:53 by simonmar]
simonmar authored Dec 7, 1999
67 ################################################################################
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
68 #
69 # Variables that control how the compiler itself is built
19aeaaf [project @ 1998-08-14 13:19:04 by sof]
sof authored Aug 14, 1998
70 #
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
71 ################################################################################
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
72
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored Nov 2, 2000
73 # The compiler used to build GHC is $(GHC). To change the actual compiler
74 # used, re-configure with --with-ghc=<path-to-ghc>.
8671c09 [project @ 1999-01-10 17:16:45 by sof]
sof authored Jan 10, 1999
75
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
76 # Extra ways in which to build the compiler (for example, you might want to
77 # build a profiled compiler so you can see where it spends its time)
78 GhcCompilerWays=
79
80 # Extra option flags to pass to the compiler that compiles the compiler
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
81 # (Ones that are essential are wired into compiler/Makefile)
7d34d68 [project @ 2001-07-25 10:10:25 by simonmar]
simonmar authored Jul 25, 2001
82 # Typical options to use here:
b97c723 [project @ 1997-09-03 23:18:41 by sof]
sof authored Sep 3, 1997
83 #
7d34d68 [project @ 2001-07-25 10:10:25 by simonmar]
simonmar authored Jul 25, 2001
84 # -DDEBUG include debugging code and assertions (will make the
85 # compiler slower and produce debugging output, but useful
86 # for development)
b97c723 [project @ 1997-09-03 23:18:41 by sof]
sof authored Sep 3, 1997
87 #
88 # -dcore-lint check the types after every pass of the compiler;
7d34d68 [project @ 2001-07-25 10:10:25 by simonmar]
simonmar authored Jul 25, 2001
89 # a pretty strong internal check of the compiler being
90 # used to compile GHC. Useful when bootstrapping.
91 GhcHcOpts=-Rghc-timing
92
1ab3f87 [project @ 2002-11-19 11:10:44 by simonmar]
simonmar authored Nov 19, 2002
93 # Extra options added to specific stages of the compiler bootstrap.
94 # These are placed later on the command line, and may therefore
95 # override options from $(GhcHcOpts).
96 GhcStage1HcOpts=
847b9f6 @simonmar use -O2 for libraries and stage2 compiler by default
simonmar authored May 20, 2008
97 GhcStage2HcOpts=-O2
98 GhcStage3HcOpts=-O2
1ab3f87 [project @ 2002-11-19 11:10:44 by simonmar]
simonmar authored Nov 19, 2002
99
b3199f6 @ezyang Flag for defaulting the codegen GhcStageXDefaultNewCodegen.
ezyang authored Apr 4, 2011
100 # These options modify whether or not a built compiler for a bootstrap
101 # stage defaults to using the new code generation path. The new
102 # code generation path is a bit slower, so for development just
103 # GhcStage2DefaultNewCodegen=YES, but it's also a good idea to try
104 # building all libraries and the stage2 compiler with the
105 # new code generator, which involves GhcStage1DefaultNewCodegen=YES.
106 GhcStage1DefaultNewCodegen=NO
107 GhcStage2DefaultNewCodegen=NO
108 GhcStage3DefaultNewCodegen=NO
109
c5b41b6 @igfoo Add a GhcDebugged build setting, for whether GHC is linked with -debug
igfoo authored Aug 17, 2007
110 GhcDebugged=NO
3c6190b @simonmar Add $(GhcDynamic) knob, set to YES to get stage2 linked with -dynamic
simonmar authored Apr 28, 2010
111 GhcDynamic=NO
1caf694 Delete GhcLibProfiled
simonpj@microsoft.com authored Aug 13, 2010
112
113 # GhcProfiled=YES means compile a profiled stage-2 compiler
114 GhcProfiled=NO
aacbb99 @igfoo Get closer to GhcCompilerWays=p working
igfoo authored Aug 12, 2007
115
d6d0a19 @simonmar Fix up logic to decide whether shared libs are being built or not
simonmar authored Sep 9, 2009
116 # Do we support shared libs?
e7f04c3 @kgardas - disable shared lib support on Solaris 10 and older (fixes #4973)
kgardas authored Apr 8, 2011
117 SharedLibsPlatformList = i386-unknown-linux x86_64-unknown-linux \
190b2d9 @mkilian Enable shared libs on OpenBSD
mkilian authored Sep 18, 2010
118 i386-unknown-freebsd x86_64-unknown-freebsd \
119 i386-unknown-openbsd x86_64-unknown-openbsd \
120 i386-unknown-mingw32 \
e7f04c3 @kgardas - disable shared lib support on Solaris 10 and older (fixes #4973)
kgardas authored Apr 8, 2011
121 i386-apple-darwin powerpc-apple-darwin
122
5c42c79 @igfoo Tweak some makefile code
igfoo authored Jun 12, 2011
123 ifeq "$(SOLARIS_BROKEN_SHLD)" "NO"
124 SharedLibsPlatformList += i386-unknown-solaris2
e7f04c3 @kgardas - disable shared lib support on Solaris 10 and older (fixes #4973)
kgardas authored Apr 8, 2011
125 endif
126
127 PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
128 $(SharedLibsPlatformList)),YES,NO)
d6d0a19 @simonmar Fix up logic to decide whether shared libs are being built or not
simonmar authored Sep 9, 2009
129
4a84bb3 [project @ 2001-01-16 12:31:18 by simonmar]
simonmar authored Jan 16, 2001
130 # Build a compiler that will build *unregisterised* libraries and
131 # binaries by default. Unregisterised code is supposed to compile and
132 # run without any support for architecture-specific assembly mangling,
133 # register assignment or tail-calls, and is therefore a good way to get
134 # started when porting GHC to new architectures.
135 #
02670da [project @ 2003-09-15 14:20:45 by simonmar]
simonmar authored Sep 15, 2003
136 # NOTE: the stage1 compiler will be a registerised binary (assuming
137 # the compiler you build with is generating registerised binaries), but
138 # the stage2 compiler will be an unregisterised binary.
4a84bb3 [project @ 2001-01-16 12:31:18 by simonmar]
simonmar authored Jan 16, 2001
139 #
0f0a3c9 @simonmar fix GhcUnregisterised default, and add kfreebsdgnu to OsSupportsGhci
simonmar authored Sep 6, 2011
140 ifneq "$(findstring $(HostArch_CPP), i386 x86_64 powerpc)" ""
4a84bb3 [project @ 2001-01-16 12:31:18 by simonmar]
simonmar authored Jan 16, 2001
141 GhcUnregisterised=NO
0f0a3c9 @simonmar fix GhcUnregisterised default, and add kfreebsdgnu to OsSupportsGhci
simonmar authored Sep 6, 2011
142 else
143 GhcUnregisterised=YES
6cdc302 turn on unregisterised by default for alpha, hppa
Simon Marlow authored Mar 16, 2006
144 endif
4a84bb3 [project @ 2001-01-16 12:31:18 by simonmar]
simonmar authored Jan 16, 2001
145
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
146 # Build a compiler with a native code generator backend
147 # (as well as a C backend)
148 #
149 # Target platforms supported:
a60a1a8 [project @ 2004-10-19 08:52:33 by simonmar]
simonmar authored Oct 19, 2004
150 # i386, powerpc
c4aefec [project @ 2005-11-23 12:23:10 by simonmar]
simonmar authored Nov 23, 2005
151 # AIX is not supported
9fcdd13 Enable the native code generator for SPARC
Ben.Lippmeier@anu.edu.au authored Jan 5, 2009
152 ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc)))
c4aefec [project @ 2005-11-23 12:23:10 by simonmar]
simonmar authored Nov 23, 2005
153 OsSupportsNCG=$(strip $(patsubst $(HostOS_CPP), YES, $(patsubst aix,,$(HostOS_CPP))))
154
45f860c Use $(if...) to get lazy tests instead of if..endif in a few places
Simon Marlow authored Jun 13, 2007
155 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
156 GhcWithNativeCodeGen=$(strip\
157 $(if $(filter YESYESNO,\
158 $(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)),YES,NO))
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
159
7c9d400 [project @ 2001-02-14 09:50:00 by simonmar]
simonmar authored Feb 14, 2001
160 HaveLibDL = @HaveLibDL@
161
139422f @igfoo Add PowerPC to the list of SMP arches
igfoo authored Dec 9, 2006
162 # ArchSupportsSMP should be set iff there is support for that arch in
2c3ac93 @simonmar comment fix
simonmar authored Aug 17, 2009
163 # includes/stg/SMP.h
e446425 @kgardas Stephen Blackheath's GHC/ARM registerised port
kgardas authored Jul 3, 2011
164 ArchSupportsSMP=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 sparc powerpc arm)))
edad062 @igfoo Fix unregisterised builds, and building on non-x86/amd64/powerpc
igfoo authored Aug 25, 2006
165
45f860c Use $(if...) to get lazy tests instead of if..endif in a few places
Simon Marlow authored Jun 13, 2007
166 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
167 GhcWithSMP=$(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised)),YES,NO))
edad062 @igfoo Fix unregisterised builds, and building on non-x86/amd64/powerpc
igfoo authored Aug 25, 2006
168
029a4f0 [project @ 2005-03-30 10:28:08 by simonmar]
simonmar authored Mar 30, 2005
169 # Whether to include GHCi in the compiler. Depends on whether the RTS linker
170 # has support for this OS/ARCH combination.
0b19ae9 [project @ 2001-01-02 11:20:35 by simonmar]
simonmar authored Jan 2, 2001
171
0f0a3c9 @simonmar fix GhcUnregisterised default, and add kfreebsdgnu to OsSupportsGhci
simonmar authored Sep 6, 2011
172 OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu)))
f7a7050 ARMv5 compatibility for registerized runtime changes.
Stephen Blackheath authored Jul 26, 2011
173 ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc sparc64)))
029a4f0 [project @ 2005-03-30 10:28:08 by simonmar]
simonmar authored Mar 30, 2005
174
175 ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
d619e76 [project @ 2001-02-12 10:13:43 by simonmar]
simonmar authored Feb 12, 2001
176 GhcWithInterpreter=YES
177 else
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored Nov 2, 2000
178 GhcWithInterpreter=NO
d619e76 [project @ 2001-02-12 10:13:43 by simonmar]
simonmar authored Feb 12, 2001
179 endif
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored Nov 2, 2000
180
80564dd Rejig TABLES_NEXT_TO_CODE: the -unreg flag was broken by earlier changes
Simon Marlow authored Oct 17, 2006
181 # GhcEnableTablesNextToCode tells us whether the target architecture
182 # supports placing info tables directly before the entry code
183 # (see TABLES_NEXT_TO_CODE in the RTS). Whether we actually compile for
184 # TABLES_NEXT_TO_CODE depends on whether we're building unregisterised
185 # code or not, which may be decided by options to the compiler later.
17d39d8 Re-enable TABLES_NEXT_TO_CODE for powerpc (was accidentally disabled)
wolfgang.thaller@gmx.net authored Oct 23, 2006
186 ifneq "$(findstring $(TargetArch_CPP)X, ia64X powerpc64X)" ""
80564dd Rejig TABLES_NEXT_TO_CODE: the -unreg flag was broken by earlier changes
Simon Marlow authored Oct 17, 2006
187 GhcEnableTablesNextToCode=NO
8c25494 @igfoo Partially fix GHCi when unregisterised
igfoo authored Oct 12, 2006
188 else
80564dd Rejig TABLES_NEXT_TO_CODE: the -unreg flag was broken by earlier changes
Simon Marlow authored Oct 17, 2006
189 GhcEnableTablesNextToCode=YES
8c25494 @igfoo Partially fix GHCi when unregisterised
igfoo authored Oct 12, 2006
190 endif
191
3242c7a @simonmar fall back on libffi for 'foreign import "wrapper"' if necessary
simonmar authored Jul 16, 2009
192 # Whether to use libffi for adjustors (foreign import "wrapper") or
193 # not. If we have built-in support (rts/Adjustor.c) then we use that,
194 # otherwise we fall back on libffi, which is slightly slower.
6cc7b51 @igfoo Tidy up the ArchHasAdjustorSupport definition
igfoo authored Sep 4, 2010
195 ArchHasAdjustorSupport = $(if $(findstring $(HostArch_CPP),i386 x86_64),YES,NO)
3242c7a @simonmar fall back on libffi for 'foreign import "wrapper"' if necessary
simonmar authored Jul 16, 2009
196 ifeq "$(ArchHasAdjustorSupport)" "YES"
197 UseLibFFIForAdjustors=NO
198 else
199 UseLibFFIForAdjustors=YES
200 endif
201
ec155f6 @igfoo Define RelocatableBuild variable
igfoo authored Sep 13, 2007
202 # On Windows we normally want to make a relocatable bindist, to we
203 # ignore flags like libdir
204 ifeq "$(Windows)" "YES"
205 RelocatableBuild = YES
206 else
207 RelocatableBuild = NO
208 endif
209
f35b012 @simonmar fix install on Windows
simonmar authored Sep 17, 2009
210 # needs to be after $(RelocatableBuild) is set above
211 include $(TOP)/mk/install.mk
212
6061064 @igfoo Add a BeConservative setting to the make system
igfoo authored Sep 10, 2007
213 # When building bindists we set this to yes so that the binaries are as
214 # portable as possible.
215 BeConservative = NO
216
e9ea88c [project @ 1997-05-19 05:30:46 by sof]
sof authored May 19, 1997
217 #
218 # Building various ways?
219 # (right now, empty if not).
220 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
221 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
222
747bac9 [project @ 1999-12-07 15:43:40 by simonmar]
simonmar authored Dec 7, 1999
223 #------------------------------------------------------------------------------
5696ec9 [project @ 2002-04-02 10:27:28 by simonpj]
simonpj authored Apr 2, 2002
224 # Options for Libraries
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
225
60714e2 @igfoo Make the integer library to use more configurable
igfoo authored Apr 20, 2008
226 # Which directory (in libraries/) contains the integer library?
227 INTEGER_LIBRARY=integer-gmp
228
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
229 # We build the libraries at least the "vanilla" way (way "v")
230 GhcLibWays = v
231
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
232 # In addition to the normal sequential way, the default is to also build
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
233 # profiled prelude libraries unless we are booting from .hc files
234 ifneq "$(BootingFromHc)" "YES"
235 GhcLibWays += p
973810c [project @ 1998-04-17 11:03:17 by sof]
sof authored Apr 17, 1998
236 endif
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
237
d6d0a19 @simonmar Fix up logic to decide whether shared libs are being built or not
simonmar authored Sep 9, 2009
238 ifeq "$(PlatformSupportsSharedLibs)" "YES"
c29b47b @simonmar add --enable-shared to configure, and $(BuildSharedLibs) to the build…
simonmar authored Jul 24, 2008
239 GhcLibWays += dyn
240 endif
241
d6d0a19 @simonmar Fix up logic to decide whether shared libs are being built or not
simonmar authored Sep 9, 2009
242 # Handy way to test whether we're building shared libs or not.
243 BuildSharedLibs=$(strip $(if $(findstring dyn,$(GhcLibWays)),YES,NO))
244
56aacf9 [project @ 2004-02-25 11:34:29 by simonmar]
simonmar authored Feb 25, 2004
245 # In addition, the RTS is built in some further variations. Ways that
246 # make sense here:
247 #
248 # thr : threaded
249 # thr_p : threaded profiled
250 # debug : debugging (compile with -g for the C compiler, and -DDEBUG)
251 # debug_p : debugging profiled
1f21512 [project @ 2004-03-01 13:44:10 by simonmar]
simonmar authored Mar 1, 2004
252 # thr_debug : debugging threaded
253 # thr_debug_p : debugging threaded profiled
8b18fae @simonmar Add fast event logging
simonmar authored Mar 17, 2009
254 # l : event logging
255 # thr_l : threaded and event logging
56aacf9 [project @ 2004-02-25 11:34:29 by simonmar]
simonmar authored Feb 25, 2004
256 #
8b18fae @simonmar Add fast event logging
simonmar authored Mar 17, 2009
257 GhcRTSWays=l
1a470c9 don't build the threaded RTS when GhcUnregisterised=YES
Simon Marlow authored May 29, 2007
258
259 # Usually want the debug version
260 ifeq "$(BootingFromHc)" "NO"
261 GhcRTSWays += debug
262 endif
263
264 # Want the threaded versions unless we're unregisterised
db91b1f FIX unregisterised build
Simon Marlow authored May 31, 2007
265 # Defer the check until later by using $(if..), because GhcUnregisterised might
266 # be set in build.mk, which hasn't been read yet.
8b18fae @simonmar Add fast event logging
simonmar authored Mar 17, 2009
267 GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_debug thr_l,)
1cbb586 @simonmar FIX unregisterised build
simonmar authored Mar 19, 2009
268 GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),$(if $(findstring NO, $(GhcUnregisterised)),thr_p,),)
d6d0a19 @simonmar Fix up logic to decide whether shared libs are being built or not
simonmar authored Sep 9, 2009
269 GhcRTSWays += $(if $(findstring dyn, $(GhcLibWays)), dyn debug_dyn $(if $(findstring NO, $(GhcUnregisterised)),thr_dyn thr_debug_dyn),)
56aacf9 [project @ 2004-02-25 11:34:29 by simonmar]
simonmar authored Feb 25, 2004
270
02b3c1a GhcThreaded was bogusly off by default due to things being in the wro…
Simon Marlow authored Sep 3, 2007
271 # We can only build GHCi threaded if we have a threaded RTS:
d4c5fb1 make the GhcThreaded setting lazy, because GhcUnregisterised might no…
Simon Marlow authored Sep 4, 2007
272 GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO)
02b3c1a GhcThreaded was bogusly off by default due to things being in the wro…
Simon Marlow authored Sep 3, 2007
273
2cc5b90 [project @ 2002-02-12 15:17:13 by simonmar]
simonmar authored Feb 12, 2002
274 # Option flags to pass to GHC when it's compiling modules in
275 # fptools/libraries. Typically these are things like -O or
276 # -dcore-lint or -H32m. The ones that are *essential* are wired into
277 # the build system.
b97c723 [project @ 1997-09-03 23:18:41 by sof]
sof authored Sep 3, 1997
278 #
847b9f6 @simonmar use -O2 for libraries and stage2 compiler by default
simonmar authored May 20, 2008
279 # -O(2) is pretty desirable, otherwise no inlining of prelude
b97c723 [project @ 1997-09-03 23:18:41 by sof]
sof authored Sep 3, 1997
280 # things (incl "+") happens when compiling with this compiler
281
54ca48a @dreixel Do not enable -XGenerics when building the optimized libs.
dreixel authored May 5, 2011
282 GhcLibHcOpts=-O2
727be8f [project @ 2000-04-14 15:55:00 by rrt]
rrt authored Apr 14, 2000
283
5696ec9 [project @ 2002-04-02 10:27:28 by simonpj]
simonpj authored Apr 2, 2002
284 # Strip local symbols from libraries? This can make the libraries smaller,
285 # but makes debugging somewhat more difficult. Doesn't work with all ld's.
286 #
287 StripLibraries=NO
288
8bac013 Add source code links to Haddock docs
Simon Marlow authored Sep 8, 2006
289 # These are the URL patterns that Haddock uses to generate the "Source
290 # File" links on each page.
e05f9de @igfoo Refer to "boot" libs, not "core" libs
igfoo authored Sep 14, 2007
291 PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
5696ec9 [project @ 2002-04-02 10:27:28 by simonpj]
simonpj authored Apr 2, 2002
292
293 # ----------------------------------------------------------------------------
294 # Object-file splitting
295 #
296 # Set SplitObjs=YES or NO in your build.mk
297 #
298 # Don't use -split-objs in in GhcLibHcOpts, because the build
299 # system needs to do other special magic if you are
300 # doing object-file splitting
301
0b2bbce @simonmar FIX #2832: Setting SplitObjs=NO doesn't disable -split-objs in GHC
simonmar authored Mar 11, 2009
302 ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))
19d8dcb @igfoo Reenable object splitting on Darwin, now #4013 appears to be fixed
igfoo authored Feb 19, 2011
303 OsSupportsSplitObjs=$(strip $(if $(filter $(TargetOS_CPP),mingw32 cygwin32 linux darwin solaris2 freebsd dragonfly netbsd openbsd),YES,NO))
7443053 @igfoo Turn off split objects on Darwin if XCode < 3.2 (#4013)
igfoo authored Feb 25, 2011
304 SplitObjsBroken = @SplitObjsBroken@
0b2bbce @simonmar FIX #2832: Setting SplitObjs=NO doesn't disable -split-objs in GHC
simonmar authored Mar 11, 2009
305
45f860c Use $(if...) to get lazy tests instead of if..endif in a few places
Simon Marlow authored Jun 13, 2007
306 # lazy test, so that $(GhcUnregisterised) can be set in build.mk
eb586af @igfoo Disable object splitting on OSX; works around #4013
igfoo authored Aug 15, 2010
307 SupportsSplitObjs=$(strip \
308 $(if $(and $(filter YES,$(ArchSupportsSplitObjs)),\
309 $(filter YES,$(OsSupportsSplitObjs)),\
7443053 @igfoo Turn off split objects on Darwin if XCode < 3.2 (#4013)
igfoo authored Feb 25, 2011
310 $(filter NO,$(SplitObjsBroken)),\
eb586af @igfoo Disable object splitting on OSX; works around #4013
igfoo authored Aug 15, 2010
311 $(filter NO,$(BootingFromHc)),\
312 $(filter NO,$(GhcUnregisterised))),\
313 YES,NO))
0b2bbce @simonmar FIX #2832: Setting SplitObjs=NO doesn't disable -split-objs in GHC
simonmar authored Mar 11, 2009
314
315 # By default, enable SplitObjs for the libraries if this build supports it
316 SplitObjs=$(SupportsSplitObjs)
747bac9 [project @ 1999-12-07 15:43:40 by simonmar]
simonmar authored Dec 7, 1999
317
f96ea25 @simonmar Don't install EXTRA_PACKAGES by default
simonmar authored Mar 30, 2010
318 # ----------------------------------------------------------------------------
319 # Package-related things
320
321 # Extra packages to add to the build, in dependency order
322 EXTRA_PACKAGES =
323
324 # Whether to install $(EXTRA_PACKAGES)
325 InstallExtraPackages = NO
326
327 # Run "ghc-pkg check" on each package
d4f9480 @igfoo Check Cabal packages when validating
igfoo authored Aug 11, 2009
328 CHECK_PACKAGES = NO
329
96adae6 @igfoo Turn off lax dependencies by default
igfoo authored Aug 30, 2011
330 # ----------------------------------------------------------------------------
331
12646a9 @igfoo By default, be lax about dependencies on GHC
igfoo authored Aug 28, 2011
332 # There are a number of things which technically depend on GHC (e.g. if
333 # ghc changes then Haskell files may be compiled differently, or Cabal
96adae6 @igfoo Turn off lax dependencies by default
igfoo authored Aug 30, 2011
334 # packages may be configured differently). By default we therefore
335 # have dependencies on the compiler executable.
336
337 # However, in practice, having a dependency on GHC is just a pain: We
338 # normally don't want to spend time recompiling other things while
339 # we're working on the compiler, and even if we did, GHC will normally
340 # decide compilation isn't needed anyway. So by setting LAX_DEPENDENCIES
341 # to YES you can turn these dependencies into order-only dependencies,
342 # i.e. GHC must exist, but if it's newer than other targets then
12646a9 @igfoo By default, be lax about dependencies on GHC
igfoo authored Aug 28, 2011
343 # rebuilding is not necessary.
96adae6 @igfoo Turn off lax dependencies by default
igfoo authored Aug 30, 2011
344
345 LAX_DEPENDENCIES = NO
12646a9 @igfoo By default, be lax about dependencies on GHC
igfoo authored Aug 28, 2011
346
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
347 # ----------------------------------------------------------------------------
348 # Options for GHC's RTS
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
349
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
350 # For an optimised RTS (you probably don't want to change these; we build
351 # a debugging RTS by default now. Use -debug to get it).
352 GhcRtsHcOpts=-optc-O2
353 GhcRtsCcOpts=-fomit-frame-pointer
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
354
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
355 # Include the front panel code? Needs GTK+.
356 GhcRtsWithFrontPanel = NO
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
357
e4e7b37 reorganise PAPI configuration: off by default, even if library is found
Simon Marlow authored Nov 20, 2006
358 # Include support for CPU performance counters via the PAPI library in the RTS?
359 # (PAPI: http://icl.cs.utk.edu/papi/)
360 GhcRtsWithPapi = NO
5c6aded allow PAPI to be installed somewhere non-standard
Simon Marlow authored Nov 1, 2007
361 PapiLibDir=
362 PapiIncludeDir=
e4e7b37 reorganise PAPI configuration: off by default, even if library is found
Simon Marlow authored Nov 20, 2006
363
54dd8d9 [project @ 1999-12-07 11:16:53 by simonmar]
simonmar authored Dec 7, 1999
364 ################################################################################
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
365 #
366 # Paths (see paths.mk)
367 #
54dd8d9 [project @ 1999-12-07 11:16:53 by simonmar]
simonmar authored Dec 7, 1999
368 ################################################################################
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
369
7fd0e6b [project @ 1999-12-22 10:11:48 by simonmar]
simonmar authored Dec 22, 1999
370 # Directory used by GHC (and possibly other tools) for storing
6392539 [project @ 2001-03-14 10:11:16 by rrt]
rrt authored Mar 14, 2001
371 # temporary files. If your TMPDIR isn't big enough, either override
7fd0e6b [project @ 1999-12-22 10:11:48 by simonmar]
simonmar authored Dec 22, 1999
372 # this in build.mk or set your environment variable "TMPDIR" to point
373 # to somewhere with more space. (TMPDIR=. is a good choice).
374
5a57472 [project @ 2000-09-05 10:16:40 by simonmar]
simonmar authored Sep 5, 2000
375 # DEFAULT_TMPDIR isn't called TMPDIR because GNU make tends to
fab764b [project @ 2000-10-31 10:52:04 by simonmar]
simonmar authored Oct 31, 2000
376 # override an environment variable with the value of the make variable
377 # of the same name (if it exists) when executing sub-processes, so
378 # setting the TMPDIR env var would have no effect in the build tree.
5a57472 [project @ 2000-09-05 10:16:40 by simonmar]
simonmar authored Sep 5, 2000
379
380 DEFAULT_TMPDIR = /tmp
74880a8 [project @ 2001-01-19 15:02:38 by rrt]
rrt authored Jan 19, 2001
381 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
1f95d6d @mchakravarty Massive patch for the first months work adding System FC to GHC #36
mchakravarty authored Aug 4, 2006
382 DEFAULT_TMPDIR = /C/TEMP
74880a8 [project @ 2001-01-19 15:02:38 by rrt]
rrt authored Jan 19, 2001
383 endif
384 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
1f95d6d @mchakravarty Massive patch for the first months work adding System FC to GHC #36
mchakravarty authored Aug 4, 2006
385 DEFAULT_TMPDIR = /C/TEMP
74880a8 [project @ 2001-01-19 15:02:38 by rrt]
rrt authored Jan 19, 2001
386 endif
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
387
ff1b272 @igfoo More bindist tweaking
igfoo authored Sep 27, 2009
388 BIN_DIST_NAME = ghc-$(ProjectVersion)
389 BIN_DIST_PREP_DIR = bindistprep/$(BIN_DIST_NAME)
390 BIN_DIST_PREP_TAR = bindistprep/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
391 BIN_DIST_PREP_TAR_BZ2 = $(BIN_DIST_PREP_TAR).bz2
392 BIN_DIST_TAR_BZ2 = $(BIN_DIST_NAME)-$(TARGETPLATFORM).tar.bz2
393 BIN_DIST_LIST = bindist-list
cafb1e0 @igfoo Fix up bindist creation and publishing
igfoo authored Sep 5, 2007
394
de4cc55 @igfoo Make Windows bindists and installers work in the new build system
igfoo authored Jun 10, 2009
395 WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-i386-windows
396 WINDOWS_INSTALLER = $(WINDOWS_INSTALLER_BASE)$(exeext)
397
13aca08 [project @ 2004-08-31 09:48:28 by simonmar]
simonmar authored Aug 31, 2004
398 # -----------------------------------------------------------------------------
399 # Utilities programs: flags
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
400
401 # If you want to give any standard flags to pretty much any utility
402 # (see utils.mk for a complete list), by adding a line here
403 #
404 # SRC_P_OPTS += ...
405 #
406 # where P is the utility. For example, to add -O to all Haskell
407 # compilations,
408 #
409 # SRC_HC_OPTS += -O
410
99b6e6a @simonmar comments on SRC_HC_OPTS (#4829)
simonmar authored Dec 14, 2010
411
412 # SRC_HC_OPTS includes flags to be added to *every* Haskell
413 # compilation. Setting SRC_HC_OPTS is a good way to set the default
414 # optimisation level (-O) and heap size (-H<size>).
415 #
416 # SRC_HC_OPTS is *not* for adding flags that are required to make your
417 # build work. Examples:
418 #
419 # - instead of using -pgmc/-pgma-/-pgml, use the --with-gcc option to configure
420 #
421 # - if you need -optc, -opta, or -optl flags, the CONF_CC_* and CONF_LD_*
422 # variables are more appropriate (set via configure)
423 #
424 # Note that SRC_HC_OPTS are added to every Haskell compilation,
425 # including when using the bootstrapping compiler (stage 0), So don't
426 # put options here that are only supported by very recent GHCs.
427 #
847b9f6 @simonmar use -O2 for libraries and stage2 compiler by default
simonmar authored May 20, 2008
428 SRC_HC_OPTS += -H32m -O
805fcaa [project @ 2002-11-15 11:20:30 by simonmar]
simonmar authored Nov 15, 2002
429
ccecbdb [project @ 2001-04-03 16:50:11 by rrt]
rrt authored Apr 3, 2001
430 # These flags make flex 8-bit
431 SRC_FLEX_OPTS += -8
432
433 # Flags for CPP when running GreenCard on .pgc files
434 GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
435
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
436
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
437 # -----------------------------------------------------------------------------
438 # Names of programs in the GHC tree
439 #
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
440 # xxx_PGM the name of an executable, without the path
441 # xxx the executable relative to the current dir
442
443 GHC_UNLIT_PGM = unlit$(exeext)
444 GHC_HP2PS_PGM = hp2ps$(exeext)
445 GHC_GHCTAGS_PGM = ghctags$(exeext)
446 GHC_HSC2HS_PGM = hsc2hs$(exeext)
447 GHC_TOUCHY_PGM = touchy$(exeext)
448 GHC_SPLIT_PGM = ghc-split
449 GHC_SYSMAN_PGM = SysMan
450 GHC_GENPRIMOP_PGM = genprimopcode$(exeext)
451 GHC_GENAPPLY_PGM = genapply$(exeext)
452 GHC_CABAL_PGM = ghc-cabal$(exeext)
453 GHC_PKG_PGM = ghc-pkg$(exeext)
454 GHC_LTX_PGM = ltx$(exeext)
455 GHC_MKDIRHIER_PGM = mkdirhier
456 GHC_LNDIR_PGM = lndir
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
457
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
458 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
459 GHC_CP = "xcopy /y"
460 GHC_PERL = perl
461 else
462 GHC_CP = $(CP)
463 GHC_PERL = $(PERL)
464 endif
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
465
70c0442 hp2ps_config_mk
Ravi Nanavati authored Sep 29, 2006
466 HP2PS = $(GHC_HP2PS_DIR)/$(GHC_HP2PS_PGM)
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
467 SPLIT = $(INPLACE_LIB)/$(GHC_SPLIT_PGM)
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
468 SYSMAN = $(GHC_SYSMAN_DIR)/$(GHC_SYSMAN_PGM)
469 LTX = $(GHC_LTX_DIR)/$(GHC_LTX_PGM)
470 LNDIR = $(GHC_LNDIR_DIR)/$(GHC_LNDIR_PGM)
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
471
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
472 UNLIT = $(INPLACE_LIB)/$(GHC_UNLIT_PGM)
473 TOUCHY = $(INPLACE_LIB)/$(GHC_TOUCHY_PGM)
474 MKDIRHIER = $(INPLACE_BIN)/$(GHC_MKDIRHIER_PGM)
475 GHC_CABAL_INPLACE = $(INPLACE_BIN)/$(GHC_CABAL_PGM)
476 GENAPPLY_INPLACE = $(INPLACE_BIN)/$(GHC_GENAPPLY_PGM)
477 GHC_PKG_INPLACE = $(INPLACE_BIN)/$(GHC_PKG_PGM)
478 GHCTAGS_INPLACE = $(INPLACE_BIN)/$(GHC_GHCTAGS_PGM)
479 HSC2HS_INPLACE = $(INPLACE_BIN)/$(GHC_HSC2HS_PGM)
480 GENPRIMOP_INPLACE = $(INPLACE_BIN)/$(GHC_GENPRIMOP_PGM)
481
b6d8ea3 @igfoo Tweak generation of generated files
igfoo authored May 12, 2007
482 GENERATED_FILE = chmod a-w
430453c @igfoo Rework the build system a bit
igfoo authored May 31, 2007
483 EXECUTABLE_FILE = chmod +x
b6d8ea3 @igfoo Tweak generation of generated files
igfoo authored May 12, 2007
484
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
485 #-----------------------------------------------------------------------------
0f9cb50 @igfoo Remove unused variables from the build system: HBC, NHC, MKDEPENDHS
igfoo authored Nov 24, 2010
486 # Installed GHC
747bac9 [project @ 1999-12-07 15:43:40 by simonmar]
simonmar authored Dec 7, 1999
487
0f9cb50 @igfoo Remove unused variables from the build system: HBC, NHC, MKDEPENDHS
igfoo authored Nov 24, 2010
488 # $(GHC) points to installed version of the compiler.
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored Nov 2, 2000
489 #
490 # NOTE: Don't override $(GHC) in build.mk, use configure --with-ghc instead
491 # (because the version numbers have to be calculated).
747bac9 [project @ 1999-12-07 15:43:40 by simonmar]
simonmar authored Dec 7, 1999
492
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
493 GHC := @WithGhc@
494 # If we have a make dependency on c:/ghc/ghc, and the file is actually
495 # called c:/ghc/ghc.exe, then make will think that ghc doesn't exist
496 # and that it doesn't know how to create it.
497 ifneq "$(wildcard $(GHC).exe)" ""
498 GHC := $(GHC).exe
499 endif
500
9c569d6 [project @ 1999-12-08 10:10:59 by simonmar]
simonmar authored Dec 8, 1999
501 # Sometimes we want to invoke ghc from the build tree in different
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
502 # places (eg. it's handy to have a nofib & a ghc build in the same
f0c9208 [project @ 2000-10-03 10:20:07 by rrt]
rrt authored Oct 3, 2000
503 # tree). We can refer to "this ghc" as $(GHC_INPLACE):
9c569d6 [project @ 1999-12-08 10:10:59 by simonmar]
simonmar authored Dec 8, 1999
504
9412e62 @igfoo Get building GHC itself with Cabal more-or-less working
igfoo authored Jul 16, 2008
505 GHC_INPLACE = $(GHC_STAGE1)
d70b588 pass -no-user-package-conf to ghc-inplace
Simon Marlow authored Jan 4, 2008
506
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
507 GHC_STAGE0_ABS = $(GHC)
508 GHC_STAGE1_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage1$(exeext)
509 GHC_STAGE2_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage2$(exeext)
510 GHC_STAGE3_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage3$(exeext)
eae65ca @igfoo Remove Cabal modules from compat
igfoo authored Jul 3, 2008
511
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
512 GHC_STAGE0 = $(GHC)
513 GHC_STAGE1 = $(INPLACE_BIN)/ghc-stage1$(exeext)
514 GHC_STAGE2 = $(INPLACE_BIN)/ghc-stage2$(exeext)
515 GHC_STAGE3 = $(INPLACE_BIN)/ghc-stage3$(exeext)
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
516
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
517 # Install stage 2 by default, can be changed to 3
518 INSTALL_GHC_STAGE=2
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
519
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
520 BOOTSTRAPPING_CONF = libraries/bootstrapping.conf
3a7fa9b set $(GhcVersion) and $(GhcPatchLevel) correctly when $(UseStage1)==YES
Simon Marlow authored May 10, 2006
521
930421d @simonmar Change the representation of the package database
simonmar authored Sep 10, 2009
522 INPLACE_PACKAGE_CONF = $(INPLACE_LIB)/package.conf.d
3a7fa9b set $(GhcVersion) and $(GhcPatchLevel) correctly when $(UseStage1)==YES
Simon Marlow authored May 10, 2006
523
524 GhcVersion = @GhcVersion@
525 GhcPatchLevel = @GhcPatchLevel@
526 GhcMajVersion = @GhcMajVersion@
527 GhcMinVersion = @GhcMinVersion@
528
0f183f7 @igfoo When compiling with GHC >= 6.13, use -rtsopts
igfoo authored Mar 14, 2010
529 # Keep this in sync with the variables in package-config.mk
530 ghc_ge_613 = @ghc_ge_613@
3a7fa9b set $(GhcVersion) and $(GhcPatchLevel) correctly when $(UseStage1)==YES
Simon Marlow authored May 10, 2006
531
532 # Canonicalised ghc version number, used for easy (integer) version
533 # comparisons. We must expand $(GhcMinVersion) to two digits by
534 # adding a leading zero if necessary:
535 ifneq "$(findstring $(GhcMinVersion), 0 1 2 3 4 5 6 7 8 9)" ""
536 GhcCanonVersion = $(GhcMajVersion)0$(GhcMinVersion)
537 else
538 GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
539 endif
9c569d6 [project @ 1999-12-08 10:10:59 by simonmar]
simonmar authored Dec 8, 1999
540
f4e534f @simonmar workaround for #5485: use -fno-full-laziness with 7.2.1
simonmar authored Oct 3, 2011
541 # Work around #5453, which causes the stage1 compiler to segfault when
542 # built with 7.2.1.
543 ifeq "$(GhcVersion)" "7.2.1"
544 CONF_HC_OPTS_STAGE0 += -fno-full-laziness
545 compiler/cmm/Bitmap_HC_OPTS += -ffull-laziness
546 # urgh. Compiling cmm/Bitmap.hs with -fno-full-laziness results in
547 # "gmp: overflow in mpz type"
548 # for some unknown reason, so turn full-laziness back on for this module.
549 endif
550
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
551 #-----------------------------------------------------------------------------
552 # C compiler
553 #
30b24de [project @ 2001-07-13 15:03:00 by simonmar]
simonmar authored Jul 13, 2001
554 # NB. Don't override $(WhatGccIsCalled) using build.mk, re-configure using
555 # the flag --with-gcc=<blah> instead. The reason is that the configure script
556 # needs to know which gcc you're using in order to perform its tests.
557
8fe6e82 [project @ 1998-08-18 20:43:35 by sof]
sof authored Aug 18, 1998
558 WhatGccIsCalled = @WhatGccIsCalled@
c7b6fe9 [project @ 2004-05-20 07:15:47 by mthomas]
mthomas authored May 20, 2004
559 GccVersion = @GccVersion@
f2935c8 @igfoo Remove UseGcc makefile var
igfoo authored Apr 22, 2011
560 GccLT34 = @GccLT34@
0a6f26f @igfoo Fix gcc 4.6 warnings; fixes #5176
igfoo authored Jun 24, 2011
561 GccLT46 = @GccLT46@
f2935c8 @igfoo Remove UseGcc makefile var
igfoo authored Apr 22, 2011
562 CC = $(WhatGccIsCalled)
b8c2582 @igfoo Get CC_STAGE0 from the bootstrapping compiler
igfoo authored Apr 23, 2011
563 CC_STAGE0 = @CC_STAGE0@
f845e5f @igfoo Make stage-specific CC variables
igfoo authored Apr 23, 2011
564 CC_STAGE1 = $(CC)
565 CC_STAGE2 = $(CC)
566 CC_STAGE3 = $(CC)
3d8e6f6 @igfoo Add stage-specific AS variables to the build system
igfoo authored Apr 29, 2011
567 AS = $(WhatGccIsCalled)
568 AS_STAGE0 = @CC_STAGE0@
569 AS_STAGE1 = $(AS)
570 AS_STAGE2 = $(AS)
571 AS_STAGE3 = $(AS)
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
572
93cd317 @simonmar add $(CONF_*_OPTS) for options that come from ./configure (fixes #3426)
simonmar authored Sep 8, 2009
573 # C compiler and linker flags from configure (e.g. -m<blah> to select
22294cd @igfoo Remove some duplication of C flags
igfoo authored Aug 19, 2010
574 # correct C compiler backend). The stage number is the stage of GHC
575 # that is being used to compile with.
30fad70 @igfoo Use different CC/LD options for different stages
igfoo authored Jul 23, 2010
576 CONF_CC_OPTS_STAGE0 = @CONF_CC_OPTS_STAGE0@
577 CONF_CC_OPTS_STAGE1 = @CONF_CC_OPTS_STAGE1@
578 CONF_CC_OPTS_STAGE2 = @CONF_CC_OPTS_STAGE2@
001b9a4 @igfoo Keep separate linker flags, for when we want to link with gcc or ld
igfoo authored Jan 24, 2011
579 CONF_GCC_LINKER_OPTS_STAGE0 = @CONF_GCC_LINKER_OPTS_STAGE0@
580 CONF_GCC_LINKER_OPTS_STAGE1 = @CONF_GCC_LINKER_OPTS_STAGE1@
581 CONF_GCC_LINKER_OPTS_STAGE2 = @CONF_GCC_LINKER_OPTS_STAGE2@
582 CONF_LD_LINKER_OPTS_STAGE0 = @CONF_LD_LINKER_OPTS_STAGE0@
583 CONF_LD_LINKER_OPTS_STAGE1 = @CONF_LD_LINKER_OPTS_STAGE1@
584 CONF_LD_LINKER_OPTS_STAGE2 = @CONF_LD_LINKER_OPTS_STAGE2@
75cd9c5 @igfoo Make CPPFLAGS variables, as well as CFLAGS and LDFLAGS
igfoo authored Dec 7, 2010
585 CONF_CPP_OPTS_STAGE0 = @CONF_CPP_OPTS_STAGE0@
586 CONF_CPP_OPTS_STAGE1 = @CONF_CPP_OPTS_STAGE1@
587 CONF_CPP_OPTS_STAGE2 = @CONF_CPP_OPTS_STAGE2@
5002727 [project @ 2001-03-23 16:36:20 by simonmar]
simonmar authored Mar 23, 2001
588
af046f8 [project @ 2002-06-09 14:01:27 by matthewc]
matthewc authored Jun 9, 2002
589 ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
93cd317 @simonmar add $(CONF_*_OPTS) for options that come from ./configure (fixes #3426)
simonmar authored Sep 8, 2009
590 CONF_CC_OPTS += -G0
af046f8 [project @ 2002-06-09 14:01:27 by matthewc]
matthewc authored Jun 9, 2002
591 endif
592
5c538c4 @igfoo Fix the build on Windows (disable hsc2hs --cross-safe)
igfoo authored Mar 26, 2011
593 # The .hsc files aren't currently safe for cross-compilation on Windows:
594 # libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:160
595 # directive "let" is not safe for cross-compilation
596 ifneq "$(Windows)" "YES"
4a2a508 @igfoo Document new hsc2hs flags, and use the --cross-safe flag when we're c…
igfoo authored Mar 23, 2011
597 SRC_HSC2HS_OPTS += --cross-safe
5c538c4 @igfoo Fix the build on Windows (disable hsc2hs --cross-safe)
igfoo authored Mar 26, 2011
598 endif
30fad70 @igfoo Use different CC/LD options for different stages
igfoo authored Jul 23, 2010
599 SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE0)))
1c7a841 @igfoo Fix the way we pass GMP_INCLUDE_DIRS to hsc2hs; spotted by Andres Loh
igfoo authored Jul 30, 2008
600 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
98a1894 @igfoo Build hsc2hs with Cabal
igfoo authored Jul 5, 2008
601
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
602 #-----------------------------------------------------------------------------
f97dcf9 [project @ 2005-03-08 04:45:29 by wolfgang]
wolfgang authored Mar 8, 2005
603 # Mingwex Library
3144260 [project @ 2002-10-12 23:12:08 by wolfgang]
wolfgang authored Oct 12, 2002
604 #
f97dcf9 [project @ 2005-03-08 04:45:29 by wolfgang]
wolfgang authored Mar 8, 2005
605 HaveLibMingwEx = @HaveLibMingwEx@
86876c3 @igfoo Use dlltool from the in-tree mingw installation
igfoo authored Dec 1, 2009
606 DLLTOOL = inplace/mingw/bin/dlltool.exe
3144260 [project @ 2002-10-12 23:12:08 by wolfgang]
wolfgang authored Oct 12, 2002
607
608 #-----------------------------------------------------------------------------
e8b241a [project @ 2003-08-18 15:45:07 by panne]
panne authored Aug 18, 2003
609 # Flex (currently unused, could be moved to glafp-utils)
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
610
e8b241a [project @ 2003-08-18 15:45:07 by panne]
panne authored Aug 18, 2003
611 # FLEX = @LEX@
8fe6e82 [project @ 1998-08-18 20:43:35 by sof]
sof authored Aug 18, 1998
612 # Don't bother with -lfl, we define our own yywrap()s anyway.
e8b241a [project @ 2003-08-18 15:45:07 by panne]
panne authored Aug 18, 2003
613 # FLEX_LIB =
8fe6e82 [project @ 1998-08-18 20:43:35 by sof]
sof authored Aug 18, 1998
614 #WAS:FLEX_LIB = @LEXLIB@
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
615
616 #-----------------------------------------------------------------------------
617 # Other standard (ha!) Unix utilities
618
619 AR = @ArCmd@
723eb70 @simonmar Fix #3642: m GHC builds using the Haskell Platform
simonmar authored Nov 5, 2009
620 AR_OPTS = @ArArgs@
f74a195 @igfoo Explicitly check whether ar supports the @file syntax
igfoo authored Mar 29, 2010
621 ArSupportsAtFile = @ArSupportsAtFile@
02c76a0 @igfoo Make and use AR_STAGE[0123] makefile vars
igfoo authored Apr 23, 2011
622
a8ea672 @igfoo Add ar location and details to settings file
igfoo authored Apr 29, 2011
623 AR_STAGE0 = @AR_STAGE0@
02c76a0 @igfoo Make and use AR_STAGE[0123] makefile vars
igfoo authored Apr 23, 2011
624 AR_STAGE1 = $(AR)
625 AR_STAGE2 = $(AR)
626 AR_STAGE3 = $(AR)
a8ea672 @igfoo Add ar location and details to settings file
igfoo authored Apr 29, 2011
627 AR_OPTS_STAGE0 = @AR_OPTS_STAGE0@
70b4e94 @igfoo Add stage-specific versions of more ar-related makefile vars
igfoo authored Apr 23, 2011
628 AR_OPTS_STAGE1 = $(AR_OPTS)
629 AR_OPTS_STAGE2 = $(AR_OPTS)
630 AR_OPTS_STAGE3 = $(AR_OPTS)
631 EXTRA_AR_ARGS_STAGE0 = $(EXTRA_AR_ARGS)
632 EXTRA_AR_ARGS_STAGE1 = $(EXTRA_AR_ARGS)
633 EXTRA_AR_ARGS_STAGE2 = $(EXTRA_AR_ARGS)
634 EXTRA_AR_ARGS_STAGE3 = $(EXTRA_AR_ARGS)
a8ea672 @igfoo Add ar location and details to settings file
igfoo authored Apr 29, 2011
635 ArSupportsAtFile_STAGE0 = @ArSupportsAtFile_STAGE0@
70b4e94 @igfoo Add stage-specific versions of more ar-related makefile vars
igfoo authored Apr 23, 2011
636 ArSupportsAtFile_STAGE1 = $(ArSupportsAtFile)
637 ArSupportsAtFile_STAGE2 = $(ArSupportsAtFile)
638 ArSupportsAtFile_STAGE3 = $(ArSupportsAtFile)
02c76a0 @igfoo Make and use AR_STAGE[0123] makefile vars
igfoo authored Apr 23, 2011
639
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
640 CONTEXT_DIFF = @ContextDiffCmd@
641 CP = cp
e6fb8c9 @igfoo Add a comment about why $(CPP) is defined the way it is in config.mk.in
igfoo authored Dec 9, 2009
642 # It's not easy to separate the CPP program from its flags, as
643 # AC_PROG_CPP defines CPP as "/usr/bin/gcc -E"
f73d132 [project @ 2001-10-13 20:46:24 by sof]
sof authored Oct 13, 2001
644 CPP = @CPP@ @CPPFLAGS@
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
645 CTAGS = $(ETAGS)
d65574a [project @ 2001-07-05 13:31:09 by sewardj]
sewardj authored Jul 5, 2001
646 #
647 # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to
648 # behave plausibly on Haskell sources.
649 #
650 RAWCPP_FLAGS = -undef -traditional
8e0fe80 [project @ 2000-04-04 15:14:18 by rrt]
rrt authored Apr 4, 2000
651 FIND = @FindCmd@
7076820 [project @ 2005-03-01 19:16:14 by sof]
sof authored Mar 1, 2005
652 SORT = @SortCmd@
5775d51 Add OSTYPE build-system variable, and use it
simonpj@microsoft.com authored Jan 13, 2011
653
1de0367 [project @ 1997-03-24 23:48:39 by sof]
sof authored Mar 24, 1997
654 #
655 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
656 # install-sh script (if chosen). This not terribly useful to us, so we convert
657 # it into an abs. path.
658 #
5775d51 Add OSTYPE build-system variable, and use it
simonpj@microsoft.com authored Jan 13, 2011
659 INSTALL = @INSTALL@
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
660 INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
5775d51 Add OSTYPE build-system variable, and use it
simonpj@microsoft.com authored Jan 13, 2011
661
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
662 LATEX = latex
5775d51 Add OSTYPE build-system variable, and use it
simonpj@microsoft.com authored Jan 13, 2011
663 PDFLATEX = pdflatex
664 BIBTEX = bibtex
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
665 LN_S = @LN_S@
666 MV = mv
667 NROFF = nroff
668 PERL = @PerlCmd@
c6cda1d [project @ 2002-07-31 14:11:13 by simonmar]
simonmar authored Jul 31, 2002
669 PYTHON = @PythonCmd@
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
670 PIC = pic
671 RANLIB = @RANLIB@
672 SED = @SedCmd@
fb783ae @igfoo Fix build with Solaris sed
igfoo authored Dec 16, 2009
673 TR = tr
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
674 SHELL = /bin/sh
4d6959b [project @ 2001-10-24 09:43:47 by simonmar]
simonmar authored Oct 24, 2001
675
015d3d4 @mchakravarty Expose all EventLog events as DTrace probes
mchakravarty authored Dec 12, 2009
676 HaveDtrace = @HaveDtrace@
f49a775 @igfoo Use DTrace whenever it's available
igfoo authored Feb 10, 2011
677 USE_DTRACE = $(HaveDtrace)
015d3d4 @mchakravarty Expose all EventLog events as DTrace probes
mchakravarty authored Dec 12, 2009
678 DTRACE = @DtraceCmd@
679
e51cdf9 @igfoo Make a mingw tree from mingw tarballs
igfoo authored Oct 23, 2009
680 LD = @LdCmd@
681 NM = @NmCmd@
f13895f [project @ 2005-01-10 11:45:19 by simonmar]
simonmar authored Jan 10, 2005
682
4d6959b [project @ 2001-10-24 09:43:47 by simonmar]
simonmar authored Oct 24, 2001
683 # Some ld's support the -x flag and some don't, so the configure
684 # script detects which we have and sets LdXFlag to "-x" or ""
685 # respectively.
686 LD_X = @LdXFlag@
687
f13895f [project @ 2005-01-10 11:45:19 by simonmar]
simonmar authored Jan 10, 2005
688 # GNU ld supports input via a linker script, which is useful to avoid
689 # overflowing command-line length limits.
690 LdIsGNULd = @LdIsGNULd@
691
a52ff76 @simonmar Change the way module initialisation is done (#3252, #4417)
simonmar authored Apr 12, 2011
692 # Set to YES if ld has the --build-id flag. Sometimes we need to
693 # disable it with --build-id=none.
694 LdHasBuildId = @LdHasBuildId@
695
d42eeec @simonmar Fix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES
simonmar authored May 21, 2009
696 # On MSYS, building with SplitObjs=YES fails with
697 # ar: Bad file number
698 # see #3201. We need to specify a smaller max command-line size
429dc9a @igfoo Reduce the xargs -s value we use on Windows
igfoo authored Aug 12, 2010
699 # to work around it. 32767 doesn't work; 30000 does, but says
700 # xargs: value for -s option should be < 28153
701 # so we now use 20000 to be comfortably below this bound
d42eeec @simonmar Fix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES
simonmar authored May 21, 2009
702 XARGS = xargs
2440b61 @igfoo Split XARGS into XARGS and XARGS_OPTS
igfoo authored Nov 7, 2009
703 ifeq "$(Windows)" "YES"
429dc9a @igfoo Reduce the xargs -s value we use on Windows
igfoo authored Aug 12, 2010
704 XARGS_OPTS = -s 20000
d42eeec @simonmar Fix #3201: "ar: Bad file number" build error with MSYS and SplitObjs=YES
simonmar authored May 21, 2009
705 endif
706
8a79c85 [project @ 1997-05-18 02:04:51 by sof]
sof authored May 18, 1997
707 #
708 # In emergency situations, REAL_SHELL is used to perform shell commands
709 # from within the ghc driver script, by scribbling the command line to
710 # a temp file and then having $(REAL_SHELL) execute it.
711 #
712 # The reason for having to do this is that overly long command lines
713 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
714 # 2.5.1), which is why this backdoor is provided. The situation of overly
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
715 # long command lines is either encountered while doing `make boot' in compiler/,
8a79c85 [project @ 1997-05-18 02:04:51 by sof]
sof authored May 18, 1997
716 # or when linking the compiler binary (`hsc').
717 #
718 # We do not use SHELL to execute long commands, as `make' will more than likely
719 # override whatever setting you have in your environment while executing.
720
72577aa [project @ 2000-05-10 12:43:08 by rrt]
rrt authored May 10, 2000
721 # By default, REAL_SHELL is set equal to SHELL, which is not really a smart move
df6c390 [project @ 1999-06-18 13:02:13 by simonmar]
simonmar authored Jun 18, 1999
722 # as it is SHELL that will show up the bogosity in the first place, but setting
8a79c85 [project @ 1997-05-18 02:04:51 by sof]
sof authored May 18, 1997
723 # it to anything else isn't really portable.
724 #
725 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
726 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
727 # command shell.
728 #
0481fe0 @igfoo Rename some variables from FOO to FOO_CMD
igfoo authored Jun 16, 2010
729 REAL_SHELL = $(SHELL)
730
731 STRIP_CMD = strip
732 PATCH_CMD = @PatchCmd@
733 TAR_CMD = @TarCmd@
734 BZIP2_CMD = bzip2
735 GZIP_CMD = gzip
76cf76a [project @ 1997-10-02 19:24:01 by sof]
sof authored Oct 2, 1997
736
4108894 @igfoo Convert some more variable names to FOO_CMD, for consistency
igfoo authored Jun 16, 2010
737 HSCOLOUR_CMD = @HSCOLOUR@
b93e282 @igfoo MERGED: If we have hscolour then make source code links in teh haddoc…
igfoo authored Nov 23, 2007
738
4108894 @igfoo Convert some more variable names to FOO_CMD, for consistency
igfoo authored Jun 16, 2010
739 TIME_CMD = @TimeCmd@
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
740
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
741 # GTK+
4108894 @igfoo Convert some more variable names to FOO_CMD, for consistency
igfoo authored Jun 16, 2010
742 GTK_CONFIG_CMD = @GTK_CONFIG@
0065d5a Reorganisation of the source tree
Simon Marlow authored Apr 7, 2006
743
a12dcc8 @igfoo Build Windows installer when making a bindist if ISCC is set
igfoo authored May 29, 2007
744 # Set this if you want to use Inno Setup to build a Windows installer
745 # when you make a bindist
4108894 @igfoo Convert some more variable names to FOO_CMD, for consistency
igfoo authored Jun 16, 2010
746 ISCC_CMD =
a12dcc8 @igfoo Build Windows installer when making a bindist if ISCC is set
igfoo authored May 29, 2007
747
eb2fa06 [project @ 1997-12-16 11:54:30 by simonm]
simonm authored Dec 16, 1997
748 #-----------------------------------------------------------------------------
53386c3 [project @ 2004-08-15 20:28:02 by panne]
panne authored Aug 15, 2004
749 # DocBook XML stuff
750
cfe2fd2 @simonmar tidy up autoconfiguration of docbook stuff
simonmar authored Jun 2, 2009
751 BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
752 BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
753 BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
754 DBLATEX = @DblatexCmd@
755 XSLTPROC = @XsltprocCmd@
756 XMLLINT = @XmllintCmd@
757 HAVE_DOCBOOK_XSL = @HAVE_DOCBOOK_XSL@
758 XSLTPROC_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
759 XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
760 --stringparam section.autolabel 1 \
761 --stringparam section.label.includes.component.label 1
0ba4b0a [project @ 2004-08-21 13:29:26 by panne]
panne authored Aug 21, 2004
762
53386c3 [project @ 2004-08-15 20:28:02 by panne]
panne authored Aug 15, 2004
763 #-----------------------------------------------------------------------------
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored Mar 14, 1997
764 # FPtools support software
765
766 #
a08aa16 [project @ 2003-05-17 14:49:45 by reid]
reid authored May 17, 2003
767 # ghc-pkg
768 #
769 GHC_PKG = @GhcPkgCmd@
770
771 #
397858e [project @ 2000-07-17 11:15:07 by simonmar]
simonmar authored Jul 17, 2000
772 # Happy
773 #
774 HAPPY = @HappyCmd@
775 HAPPY_VERSION = @HappyVersion@
776 #
777 # Options to pass to Happy when we're going to compile the output with GHC
778 #
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
779 SRC_HAPPY_OPTS = -agc --strict
397858e [project @ 2000-07-17 11:15:07 by simonmar]
simonmar authored Jul 17, 2000
780
781 #
9546b1b [project @ 2003-08-13 12:34:45 by simonmar]
simonmar authored Aug 13, 2003
782 # Alex
783 #
784 ALEX = @AlexCmd@
785 ALEX_VERSION = @AlexVersion@
59534b8 @simonmar Update to work with Alex 3.0: basically disabling Alex's new Unicode
simonmar authored Aug 4, 2011
786 Alex3 = @Alex3@
9546b1b [project @ 2003-08-13 12:34:45 by simonmar]
simonmar authored Aug 13, 2003
787 #
788 # Options to pass to Happy when we're going to compile the output with GHC
789 #
59534b8 @simonmar Update to work with Alex 3.0: basically disabling Alex's new Unicode
simonmar authored Aug 4, 2011
790 ifeq "$(Alex3)" "YES"
791 # We aren't using the Unicode support in Alex 3.0 yet, in fact we do our own
792 # Unicode handling, so diable Alex's.
793 SRC_ALEX_OPTS = -g --latin1
794 else
34cc75e @igfoo GHC new build system megapatch
igfoo authored Apr 26, 2009
795 SRC_ALEX_OPTS = -g
59534b8 @simonmar Update to work with Alex 3.0: basically disabling Alex's new Unicode
simonmar authored Aug 4, 2011
796 endif
9546b1b [project @ 2003-08-13 12:34:45 by simonmar]
simonmar authored Aug 13, 2003
797
c54391d @igfoo By default, only HsColour the docs if we find HsColour. Fixes trac #3…
igfoo authored Mar 5, 2009
798 # Should we build haddock docs?
8ca5375 @igfoo Always haddock by default
igfoo authored Jul 30, 2010
799 HADDOCK_DOCS = YES
c54391d @igfoo By default, only HsColour the docs if we find HsColour. Fixes trac #3…
igfoo authored Mar 5, 2009
800 # And HsColour the sources?
d970798 @igfoo Fix the HsColour test in the build system
igfoo authored Aug 5, 2010
801 ifeq "$(HSCOLOUR_CMD)" ""
c54391d @igfoo By default, only HsColour the docs if we find HsColour. Fixes trac #3…
igfoo authored Mar 5, 2009
802 HSCOLOUR_SRCS = NO
803 else
804 HSCOLOUR_SRCS = YES
805 endif
806
3a24413 [project @ 2001-08-27 14:27:23 by apt]
apt authored Aug 27, 2001
807 ################################################################################
808 #
809 # 31-bit-Int Core files
810 #
811 ################################################################################
812
813 #
814 # It is possible to configure the compiler and prelude to support 31-bit
815 # integers, suitable for a back-end and RTS using a tag bit on a 32-bit
816 # architecture. Currently the only useful output from this option is external Core
817 # files. The following additions to your build.mk will produce the
818 # 31-bit core output. Note that this is *not* just a library "way"; the
819 # compiler must be built a special way too.
820
821 # GhcCppOpts +=-DWORD_SIZE_IN_BITS=31
822 # GhcLibHcOpts +=-fext-core -fno-code -DWORD_SIZE_IN_BITS=31
823 # GhcLibCppOpts += -DWORD_SIZE_IN_BITS=31
824 # SplitObjs=NO
825
8fbf686 @igfoo Pass configure arguments to the library configure scripts
igfoo authored Apr 18, 2007
826 ################################################################################
827 #
828 # Library configure arguments
829 #
830 ################################################################################
831
832 CONFIGURE_ARGS = @CONFIGURE_ARGS@
833
7230143 @igfoo BIN_DIST_INST_SUBDIR Needs to be defined in config.mk so ./Makefile c…
igfoo authored Dec 7, 2007
834 ################################################################################
835 #
acdd7c9 @mkilian Configurable iconv header and library locations
mkilian authored Aug 26, 2009
836 # To be passed to sub-builds
837 #
838 ################################################################################
839
840 ICONV_INCLUDE_DIRS = @ICONV_INCLUDE_DIRS@
841 ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
842
8822316 @igfoo Add configure flags for the location of GMP includes/library; fixes #…
igfoo authored May 25, 2010
843 GMP_INCLUDE_DIRS = @GMP_INCLUDE_DIRS@
844 GMP_LIB_DIRS = @GMP_LIB_DIRS@
Something went wrong with that request. Please try again.