4 ################################################################################
8 # This file supplies defaults for many tweakable build configuration
9 # options. Some of the defaults are filled in by the autoconf-generated
12 # DO NOT EDIT THIS FILE!
14 # - config.mk is auto-generated from config.mk.in by configure.
15 # If you edit config.mk your changes will be spammed.
17 # - Settings in this file may be overriden by giving replacement
18 # definitions in build.mk. See build.mk.sample for a good
19 # starting point for a build.mk file.
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.
24 # TOP: the top of the fptools hierarchy, absolute path.
25 # On Windows this is a c:/foo/bar style path.
28 include $(TOP)/mk/project.mk
29 include $(TOP)/mk/install.mk
31 ################################################################################
33 # Global configuration options
35 ################################################################################
37 # BootingFromHc - build GHC and the libraries from .hc files?
38 BootingFromHc = @BootingFromHc@
40 # BootingFromUnregisterisedHc - treat .hc files as containing unregisterised
41 # rather than registerised code, i.e., disable the mangler?
42 BootingFromUnregisterisedHc = @BootingFromUnregisterisedHc@
45 NO_INCLUDE_PKGDATA = NO
47 # Should we build latex docs?
50 # Mac OS X deployment target (to cross-compile for older OS versions)
52 MACOSX_DEPLOYMENT_VERSION = @MACOSX_DEPLOYMENT_VERSION@
53 MACOSX_DEPLOYMENT_SDK = @MACOSX_DEPLOYMENT_SDK@
55 ifneq "$(MACOSX_DEPLOYMENT_VERSION)" ""
56 MACOSX_DEPLOYMENT_CC_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
57 -isysroot $(MACOSX_DEPLOYMENT_SDK) \
59 MACOSX_DEPLOYMENT_LD_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
60 -Wl,-syslibroot,$(MACOSX_DEPLOYMENT_SDK)
61 # We don't extend SRC_CC_OPTS and friends here directly, as (a) they may get
62 # overwritten in build.mk and (b) we must not use the deployment options in
63 # stage 1 or we get a linker error if the bootstrap compiler is for a more
66 # We need --no-builtin-fprintf, as the use of the builtin function optimisation
67 # for fprintf together with #include "PosixSource" in the RTS leads to the
68 # use of fwrite$UNIX2003 (with GCC 4.0.1 on Mac OS X 10.5.2).
71 ################################################################################
73 # Variables that control how the compiler itself is built
75 ################################################################################
77 # The compiler used to build GHC is $(GHC). To change the actual compiler
78 # used, re-configure with --with-ghc=<path-to-ghc>.
80 # Extra ways in which to build the compiler (for example, you might want to
81 # build a profiled compiler so you can see where it spends its time)
84 # Extra option flags to pass to the compiler that compiles the compiler
85 # (Ones that are essential are wired into compiler/Makefile)
86 # Typical options to use here:
88 # -DDEBUG include debugging code and assertions (will make the
89 # compiler slower and produce debugging output, but useful
92 # -dcore-lint check the types after every pass of the compiler;
93 # a pretty strong internal check of the compiler being
94 # used to compile GHC. Useful when bootstrapping.
95 GhcHcOpts=-Rghc-timing
97 # Extra options added to specific stages of the compiler bootstrap.
98 # These are placed later on the command line, and may therefore
99 # override options from $(GhcHcOpts).
106 GhcLibProfiled=$(if $(filter p,$(GhcLibWays)),YES,NO)
108 # Build shared and/or static libs?
109 PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),i386-unknown-linux x86_64-unknown-linux),YES,NO)
110 ifeq "$(PlatformSupportsSharedLibs)" "YES"
111 BuildSharedLibs = YES
116 # BuildStaticLibs=@BuildStaticLibs@
118 # Build a compiler that will build *unregisterised* libraries and
119 # binaries by default. Unregisterised code is supposed to compile and
120 # run without any support for architecture-specific assembly mangling,
121 # register assignment or tail-calls, and is therefore a good way to get
122 # started when porting GHC to new architectures.
124 # If this is set to NO, you can still use the unregisterised way
125 # (way 'u') to get unregisterised code, but the default way will be
128 # NOTE: the stage1 compiler will be a registerised binary (assuming
129 # the compiler you build with is generating registerised binaries), but
130 # the stage2 compiler will be an unregisterised binary.
132 ifneq "$(findstring $(HostArch_CPP), alpha hppa)" ""
133 GhcUnregisterised=YES
138 # Build a compiler with a native code generator backend
139 # (as well as a C backend)
141 # Target platforms supported:
143 # AIX is not supported
144 ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc)))
145 OsSupportsNCG=$(strip $(patsubst $(HostOS_CPP), YES, $(patsubst aix,,$(HostOS_CPP))))
147 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
148 GhcWithNativeCodeGen=$(strip\
149 $(if $(filter YESYESNO,\
150 $(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)),YES,NO))
152 HaveLibDL = @HaveLibDL@
154 # ArchSupportsSMP should be set iff there is support for that arch in
156 ArchSupportsSMP=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 sparc powerpc)))
158 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
159 GhcWithSMP=$(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised)),YES,NO))
161 # Whether to include GHCi in the compiler. Depends on whether the RTS linker
162 # has support for this OS/ARCH combination.
164 OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)))
165 ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc sparc64)))
167 ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
168 GhcWithInterpreter=YES
170 GhcWithInterpreter=NO
173 # GhcEnableTablesNextToCode tells us whether the target architecture
174 # supports placing info tables directly before the entry code
175 # (see TABLES_NEXT_TO_CODE in the RTS). Whether we actually compile for
176 # TABLES_NEXT_TO_CODE depends on whether we're building unregisterised
177 # code or not, which may be decided by options to the compiler later.
178 ifneq "$(findstring $(TargetArch_CPP)X, ia64X powerpc64X)" ""
179 GhcEnableTablesNextToCode=NO
181 GhcEnableTablesNextToCode=YES
184 # Whether to use libffi for adjustors (foreign import "wrapper") or
185 # not. If we have built-in support (rts/Adjustor.c) then we use that,
186 # otherwise we fall back on libffi, which is slightly slower.
187 ArchHasAdjustorSupport=$(strip $(if $(findstring $(HostArch_CPP),i386 x86_64 alpha powerpc ia64,),YES,NO))
188 ifeq "$(ArchHasAdjustorSupport)" "YES"
189 UseLibFFIForAdjustors=NO
191 UseLibFFIForAdjustors=YES
194 # On Windows we normally want to make a relocatable bindist, to we
195 # ignore flags like libdir
196 ifeq "$(Windows)" "YES"
197 RelocatableBuild = YES
199 RelocatableBuild = NO
202 # When building bindists we set this to yes so that the binaries are as
203 # portable as possible.
207 # Building various ways?
208 # (right now, empty if not).
209 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
210 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
212 #------------------------------------------------------------------------------
213 # Options for Libraries
215 # Which directory (in libraries/) contains the integer library?
216 INTEGER_LIBRARY=integer-gmp
218 # We build the libraries at least the "vanilla" way (way "v")
221 # In addition to the normal sequential way, the default is to also build
222 # profiled prelude libraries unless we are booting from .hc files
223 ifneq "$(BootingFromHc)" "YES"
227 ifeq "$(BuildSharedLibs)" "YES"
231 # In addition, the RTS is built in some further variations. Ways that
235 # thr_p : threaded profiled
236 # debug : debugging (compile with -g for the C compiler, and -DDEBUG)
237 # debug_p : debugging profiled
238 # thr_debug : debugging threaded
239 # thr_debug_p : debugging threaded profiled
240 # t : ticky-ticky profiling
241 # debug_t : debugging ticky-ticky profiling
243 # thr_l : threaded and event logging
244 # thr_debug_l : threaded and debugging and event logging
248 # Usually want the debug version
249 ifeq "$(BootingFromHc)" "NO"
253 ifeq "$(BuildSharedLibs)" "YES"
254 GhcRTSWays += dyn debug_dyn $(if $(findstring NO, $(GhcUnregisterised)),thr_dyn thr_debug_dyn)
257 # Want the threaded versions unless we're unregisterised
258 # Defer the check until later by using $(if..), because GhcUnregisterised might
259 # be set in build.mk, which hasn't been read yet.
260 GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_debug thr_l,)
261 GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),$(if $(findstring NO, $(GhcUnregisterised)),thr_p,),)
263 # We can only build GHCi threaded if we have a threaded RTS:
264 GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO)
266 # Option flags to pass to GHC when it's compiling modules in
267 # fptools/libraries. Typically these are things like -O or
268 # -dcore-lint or -H32m. The ones that are *essential* are wired into
271 # -O(2) is pretty desirable, otherwise no inlining of prelude
272 # things (incl "+") happens when compiling with this compiler
274 # -XGenerics switches on generation of support code for
275 # derivable type classes. This is now off by default,
276 # but we switch it on for the libraries so that we generate
277 # the code in case someone importing wants it
279 GhcLibHcOpts=-O2 -XGenerics
281 # Win32 only: Enable the RTS and libraries to be built as DLLs
282 DLLized=@EnableWin32DLLs@
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.
289 # These are the URL patterns that Haddock uses to generate the "Source
290 # File" links on each page.
291 PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
293 # ----------------------------------------------------------------------------
294 # Object-file splitting
296 # Set SplitObjs=YES or NO in your build.mk
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
302 ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))
304 # lazy test, so that $(GhcUnregisterised) can be set in build.mk
305 SupportsSplitObjs=$(strip $(if $(filter YES,$(ArchSupportsSplitObjs)),\
306 $(if $(filter NO,$(BootingFromHc)),\
307 $(if $(filter NO,$(GhcUnregisterised)),\
313 # By default, enable SplitObjs for the libraries if this build supports it
314 SplitObjs=$(SupportsSplitObjs)
319 # .NET interop support?
323 # Build unix package?
325 GhcLibsWithUnix=@GhcLibsWithUnix@
329 # ----------------------------------------------------------------------------
330 # Options for GHC's RTS
332 # For an optimised RTS (you probably don't want to change these; we build
333 # a debugging RTS by default now. Use -debug to get it).
334 GhcRtsHcOpts=-optc-O2
335 GhcRtsCcOpts=-fomit-frame-pointer
337 # Include the front panel code? Needs GTK+.
338 GhcRtsWithFrontPanel = NO
340 # Include support for CPU performance counters via the PAPI library in the RTS?
341 # (PAPI: http://icl.cs.utk.edu/papi/)
346 ################################################################################
348 # Paths (see paths.mk)
350 ################################################################################
352 # Directory used by GHC (and possibly other tools) for storing
353 # temporary files. If your TMPDIR isn't big enough, either override
354 # this in build.mk or set your environment variable "TMPDIR" to point
355 # to somewhere with more space. (TMPDIR=. is a good choice).
357 # DEFAULT_TMPDIR isn't called TMPDIR because GNU make tends to
358 # override an environment variable with the value of the make variable
359 # of the same name (if it exists) when executing sub-processes, so
360 # setting the TMPDIR env var would have no effect in the build tree.
362 DEFAULT_TMPDIR = /tmp
363 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
364 DEFAULT_TMPDIR = /C/TEMP
366 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
367 DEFAULT_TMPDIR = /C/TEMP
370 BIN_DIST_TOPDIR_ABS=$(TOP)
371 BIN_DIST_DIR=$(BIN_DIST_TOPDIR_ABS)/$(BIN_DIST_NAME)
373 BIN_DIST_NAME=ghc-$(ProjectVersion)
374 BIN_DIST_TAR=$(TOP)/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
375 BIN_DIST_TAR_BZ2=$(BIN_DIST_TAR).bz2
376 BIN_DIST_PREP_DIR=$(TOP)/bindist-prep
377 BIN_DIST_PREP=$(BIN_DIST_PREP_DIR)/$(BIN_DIST_NAME)
378 BIN_DIST_LIST=$(TOP)/bindist-list
380 WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-i386-windows
381 WINDOWS_INSTALLER = $(WINDOWS_INSTALLER_BASE)$(exeext)
383 # -----------------------------------------------------------------------------
384 # Utilities programs: flags
386 # If you want to give any standard flags to pretty much any utility
387 # (see utils.mk for a complete list), by adding a line here
391 # where P is the utility. For example, to add -O to all Haskell
396 SRC_HC_OPTS += -H32m -O
398 # These flags make flex 8-bit
401 # Default fptools options for dllwrap.
402 SRC_BLD_DLL_OPTS += --target=i386-mingw32
404 # Flags for CPP when running GreenCard on .pgc files
405 GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
408 # -----------------------------------------------------------------------------
409 # Names of programs in the GHC tree
411 # xxx_PGM the name of an executable, without the path
412 # xxx the executable relative to the current dir
414 GHC_UNLIT_PGM = unlit$(exeext)
415 GHC_HP2PS_PGM = hp2ps$(exeext)
416 GHC_GHCTAGS_PGM = ghctags$(exeext)
417 GHC_HSC2HS_PGM = hsc2hs$(exeext)
418 GHC_TOUCHY_PGM = touchy$(exeext)
419 GHC_MANGLER_PGM = ghc-asm
420 GHC_SPLIT_PGM = ghc-split
421 GHC_SYSMAN_PGM = SysMan
422 GHC_GENPRIMOP_PGM = genprimopcode$(exeext)
423 GHC_GENAPPLY_PGM = genapply$(exeext)
424 GHC_CABAL_PGM = ghc-cabal$(exeext)
425 GHC_PKG_PGM = ghc-pkg$(exeext)
426 GHC_MKDEPENDC_PGM = mkdependC
427 GHC_LTX_PGM = ltx$(exeext)
428 GHC_MKDIRHIER_PGM = mkdirhier
429 GHC_LNDIR_PGM = lndir
430 GHC_DUMMY_GHC_PGM = dummy-ghc$(exeext)
432 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
440 HP2PS = $(GHC_HP2PS_DIR)/$(GHC_HP2PS_PGM)
441 MANGLER = $(INPLACE_LIB)/$(GHC_MANGLER_PGM)
442 SPLIT = $(INPLACE_LIB)/$(GHC_SPLIT_PGM)
443 SYSMAN = $(GHC_SYSMAN_DIR)/$(GHC_SYSMAN_PGM)
444 LTX = $(GHC_LTX_DIR)/$(GHC_LTX_PGM)
445 LNDIR = $(GHC_LNDIR_DIR)/$(GHC_LNDIR_PGM)
447 UNLIT = $(INPLACE_LIB)/$(GHC_UNLIT_PGM)
448 TOUCHY = $(INPLACE_LIB)/$(GHC_TOUCHY_PGM)
449 MKDIRHIER = $(INPLACE_BIN)/$(GHC_MKDIRHIER_PGM)
450 MKDEPENDC = $(INPLACE_BIN)/$(GHC_MKDEPENDC_PGM)
451 GHC_CABAL_INPLACE = $(INPLACE_BIN)/$(GHC_CABAL_PGM)
452 GENAPPLY_INPLACE = $(INPLACE_BIN)/$(GHC_GENAPPLY_PGM)
453 GHC_PKG_INPLACE = $(INPLACE_BIN)/$(GHC_PKG_PGM)
454 GHCTAGS_INPLACE = $(INPLACE_BIN)/$(GHC_GHCTAGS_PGM)
455 HSC2HS_INPLACE = $(INPLACE_BIN)/$(GHC_HSC2HS_PGM)
456 GENPRIMOP_INPLACE = $(INPLACE_BIN)/$(GHC_GENPRIMOP_PGM)
457 DUMMY_GHC_INPLACE = $(INPLACE_BIN)/$(GHC_DUMMY_GHC_PGM)
459 GENERATED_FILE = chmod a-w
460 EXECUTABLE_FILE = chmod +x
462 #-----------------------------------------------------------------------------
463 # Haskell compilers and mkdependHS
465 # $(GHC), $(HBC) and $(NHC) point to installed versions of the relevant
466 # compilers, if available.
468 # $(HC) is a generic Haskell 98 compiler, set to $(GHC) by default.
469 # $(MKDEPENDHS) is the Haskell dependency generator (ghc -M).
471 # NOTE: Don't override $(GHC) in build.mk, use configure --with-ghc instead
472 # (because the version numbers have to be calculated).
475 # If we have a make dependency on c:/ghc/ghc, and the file is actually
476 # called c:/ghc/ghc.exe, then make will think that ghc doesn't exist
477 # and that it doesn't know how to create it.
478 ifneq "$(wildcard $(GHC).exe)" ""
482 GhcDir = $(dir $(GHC))
484 # Set to YES if $(GHC) has the editline package installed
485 GhcHasEditline = @GhcHasEditline@
490 # Sometimes we want to invoke ghc from the build tree in different
491 # places (eg. it's handy to have a nofib & a ghc build in the same
492 # tree). We can refer to "this ghc" as $(GHC_INPLACE):
494 GHC_INPLACE = $(GHC_STAGE1)
496 GHC_STAGE0_ABS = $(GHC)
497 GHC_STAGE1_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage1$(exeext)
498 GHC_STAGE2_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage2$(exeext)
499 GHC_STAGE3_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage3$(exeext)
502 GHC_STAGE1 = $(INPLACE_BIN)/ghc-stage1$(exeext)
503 GHC_STAGE2 = $(INPLACE_BIN)/ghc-stage2$(exeext)
504 GHC_STAGE3 = $(INPLACE_BIN)/ghc-stage3$(exeext)
506 # Install stage 2 by default, can be changed to 3
509 BOOTSTRAPPING_CONF = libraries/bootstrapping.conf
511 INPLACE_PACKAGE_CONF = $(INPLACE_LIB)/package.conf
513 GhcVersion = @GhcVersion@
514 GhcPatchLevel = @GhcPatchLevel@
515 GhcMajVersion = @GhcMajVersion@
516 GhcMinVersion = @GhcMinVersion@
518 ghc_ge_609 = @ghc_ge_609@
520 # Canonicalised ghc version number, used for easy (integer) version
521 # comparisons. We must expand $(GhcMinVersion) to two digits by
522 # adding a leading zero if necessary:
523 ifneq "$(findstring $(GhcMinVersion), 0 1 2 3 4 5 6 7 8 9)" ""
524 GhcCanonVersion = $(GhcMajVersion)0$(GhcMinVersion)
526 GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
529 #-----------------------------------------------------------------------------
532 # NB. Don't override $(WhatGccIsCalled) using build.mk, re-configure using
533 # the flag --with-gcc=<blah> instead. The reason is that the configure script
534 # needs to know which gcc you're using in order to perform its tests.
538 WhatGccIsCalled = @WhatGccIsCalled@
539 GccVersion = @GccVersion@
540 ifeq "$(strip $(HaveGcc))" "YES"
541 ifneq "$(strip $(UseGcc))" "YES"
544 CC = $(WhatGccIsCalled)
548 # default C compiler and linker flags
549 SRC_CC_OPTS = @SRC_CC_OPTS@
550 SRC_LD_OPTS = @SRC_LD_OPTS@
552 ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
556 SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
557 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
559 #-----------------------------------------------------------------------------
562 HaveLibMingwEx = @HaveLibMingwEx@
564 #-----------------------------------------------------------------------------
565 # Flex (currently unused, could be moved to glafp-utils)
568 # Don't bother with -lfl, we define our own yywrap()s anyway.
570 #WAS:FLEX_LIB = @LEXLIB@
572 #-----------------------------------------------------------------------------
573 # Other standard (ha!) Unix utilities
576 ArSupportsInput = @ArSupportsInput@
577 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
578 BASH = /usr/local/bin/bash
580 CONTEXT_DIFF = @ContextDiffCmd@
582 CPP = @CPP@ @CPPFLAGS@
585 # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to
586 # behave plausibly on Haskell sources.
588 RAWCPP_FLAGS = -undef -traditional
593 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
594 # install-sh script (if chosen). This not terribly useful to us, so we convert
595 # it into an abs. path.
597 INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
609 PREPROCESSCMD = $(CC) -E
616 # Some ld's support the -x flag and some don't, so the configure
617 # script detects which we have and sets LdXFlag to "-x" or ""
621 # GNU ld supports input via a linker script, which is useful to avoid
622 # overflowing command-line length limits.
623 LdIsGNULd = @LdIsGNULd@
625 # On MSYS, building with SplitObjs=YES fails with
626 # ar: Bad file number
627 # see #3201. We need to specify a smaller max command-line size
628 # to work around it. 32767 doesn't work; 30000 does.
629 ifeq "$(Windows)" "YES"
630 XARGS = xargs -s 30000
636 # In emergency situations, REAL_SHELL is used to perform shell commands
637 # from within the ghc driver script, by scribbling the command line to
638 # a temp file and then having $(REAL_SHELL) execute it.
640 # The reason for having to do this is that overly long command lines
641 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
642 # 2.5.1), which is why this backdoor is provided. The situation of overly
643 # long command lines is either encountered while doing `make boot' in compiler/,
644 # or when linking the compiler binary (`hsc').
646 # We do not use SHELL to execute long commands, as `make' will more than likely
647 # override whatever setting you have in your environment while executing.
649 # By default, REAL_SHELL is set equal to SHELL, which is not really a smart move
650 # as it is SHELL that will show up the bogosity in the first place, but setting
651 # it to anything else isn't really portable.
653 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
654 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
664 HSCOLOUR = @HSCOLOUR@
667 # This is special to literate/, ToDo: add literate-specific
668 # configure setup to literate/.
673 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
681 GTK_CONFIG = @GTK_CONFIG@
683 # Set this if you want to use Inno Setup to build a Windows installer
684 # when you make a bindist
687 #-----------------------------------------------------------------------------
690 BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
691 BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
692 BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
693 DBLATEX = @DblatexCmd@
694 XSLTPROC = @XsltprocCmd@
695 XMLLINT = @XmllintCmd@
696 HAVE_DOCBOOK_XSL = @HAVE_DOCBOOK_XSL@
697 XSLTPROC_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
698 XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
699 --stringparam section.autolabel 1 \
700 --stringparam section.label.includes.component.label 1
702 #-----------------------------------------------------------------------------
703 # FPtools support software
710 GHC_PKG = @GhcPkgCmd@
715 GREENCARD = @GreenCardCmd@
716 GREENCARD_VERSION = @GreenCardVersion@
722 HAPPY_VERSION = @HappyVersion@
724 # Options to pass to Happy when we're going to compile the output with GHC
726 SRC_HAPPY_OPTS = -agc --strict
728 # Temp. to work around performance problems in the HEAD around 8/12/2003,
729 # A Happy compiled with this compiler needs more stack.
730 SRC_HAPPY_OPTS += +RTS -K2m -RTS
736 ALEX_VERSION = @AlexVersion@
738 # Options to pass to Happy when we're going to compile the output with GHC
744 # Should we build haddock docs?
746 # And HsColour the sources?
747 ifeq "$(HSCOLOUR)" ""
754 # Options for compiling in different `ways'.
756 # To configure up your own way, have a look at some of the standard ways
757 # such as profiling, and create your own set of WAY_*_OPTS defs below.
758 # After having done that, add your way string to WAYS, and after having
759 # run the configure script, the different projects will add the new way
760 # to the list of ways they support.
764 # Definitions of the different ways:
768 # - description, e.g., profiling
769 # * what they mean to the driver:
770 # - WAY_p_HC_OPTS gives the list of command-line options
775 # The ways currently defined.
777 ALL_WAYS=v p t l s mp mg debug dyn thr thr_l debug_dyn thr_dyn thr_debug_dyn thr_p thr_debug thr_debug_l debug_p thr_debug_p
778 USER_WAYS=a b c d e f g h j k l m n o A B
781 # The following ways currently have treated specially, p t mg,
782 # as the driver script treats these guys specially and needs to carefully be told
783 # about the options for these. Hence, we hide the required command line options
784 # for these in the driver, as this is the only place they are needed.
786 # If you want to add to these default options, fill in the variables below:
797 WAY_t_NAME=ticky-ticky profiling
798 WAY_t_HC_OPTS= -ticky
801 WAY_l_NAME=event logging
802 WAY_l_HC_OPTS= -eventlog
806 WAY_mp_HC_OPTS=-parallel
810 WAY_mg_HC_OPTS=-gransim
813 # These ways apply to the RTS only:
817 WAY_thr_NAME=threaded
818 WAY_thr_HC_OPTS=-optc-DTHREADED_RTS
821 WAY_thr_p_NAME=threaded profiled
822 WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof
825 WAY_thr_l_NAME=threaded event logging
826 WAY_thr_l_HC_OPTS=-optc-DTHREADED_RTS -eventlog
830 WAY_debug_HC_OPTS=-optc-DDEBUG
833 WAY_debug_p_NAME=debug profiled
834 WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
837 WAY_debug_t_NAME=debug ticky-ticky profiling
838 WAY_debug_t_HC_OPTS= -ticky -optc-DDEBUG
841 WAY_thr_debug_NAME=threaded
842 WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG
845 WAY_thr_debug_p_NAME=threaded debug profiling
846 WAY_thr_debug_p_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -prof
849 WAY_thr_debug_l_NAME=threaded debug event logging
850 WAY_thr_debug_l_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -eventlog
852 # Way 'dyn': build dynamic shared libraries
854 WAY_dyn_HC_OPTS=-fPIC -dynamic
857 WAY_thr_dyn_NAME=thr_dyn
858 WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
860 # Way 'thr_debug_dyn':
861 WAY_thr_debug_dyn_NAME=thr_dyn
862 WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
865 WAY_debug_dyn_NAME=thr_dyn
866 WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG
869 # Add user-way configurations here:
919 ################################################################################
921 # 31-bit-Int Core files
923 ################################################################################
926 # It is possible to configure the compiler and prelude to support 31-bit
927 # integers, suitable for a back-end and RTS using a tag bit on a 32-bit
928 # architecture. Currently the only useful output from this option is external Core
929 # files. The following additions to your build.mk will produce the
930 # 31-bit core output. Note that this is *not* just a library "way"; the
931 # compiler must be built a special way too.
933 # GhcCppOpts +=-DWORD_SIZE_IN_BITS=31
934 # GhcLibHcOpts +=-fext-core -fno-code -DWORD_SIZE_IN_BITS=31
935 # GhcLibCppOpts += -DWORD_SIZE_IN_BITS=31
938 ################################################################################
940 # Library configure arguments
942 ################################################################################
944 CONFIGURE_ARGS = @CONFIGURE_ARGS@
946 ################################################################################
948 # Bindist testing directory
950 ################################################################################
952 ifeq "$(Windows)" "YES"
953 BIN_DIST_INST_SUBDIR = "install dir"
955 # I very much doubt that paths with spaces will work on Unix
956 BIN_DIST_INST_SUBDIR = installed
959 BIN_DIST_INST_DIR = $(TOP)/bindisttest/$(BIN_DIST_INST_SUBDIR)