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@
541 ifeq "$(strip $(HaveGcc))" "YES"
542 ifneq "$(strip $(UseGcc))" "YES"
545 CC = $(WhatGccIsCalled)
549 # default C compiler and linker flags
550 SRC_CC_OPTS = @SRC_CC_OPTS@
551 SRC_LD_OPTS = @SRC_LD_OPTS@
553 ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
557 SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
558 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
560 #-----------------------------------------------------------------------------
563 HaveLibMingwEx = @HaveLibMingwEx@
565 #-----------------------------------------------------------------------------
566 # Flex (currently unused, could be moved to glafp-utils)
569 # Don't bother with -lfl, we define our own yywrap()s anyway.
571 #WAS:FLEX_LIB = @LEXLIB@
573 #-----------------------------------------------------------------------------
574 # Other standard (ha!) Unix utilities
577 ArSupportsInput = @ArSupportsInput@
578 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
579 BASH = /usr/local/bin/bash
581 CONTEXT_DIFF = @ContextDiffCmd@
583 CPP = @CPP@ @CPPFLAGS@
586 # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to
587 # behave plausibly on Haskell sources.
589 RAWCPP_FLAGS = -undef -traditional
594 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
595 # install-sh script (if chosen). This not terribly useful to us, so we convert
596 # it into an abs. path.
598 INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
610 PREPROCESSCMD = $(CC) -E
617 # Some ld's support the -x flag and some don't, so the configure
618 # script detects which we have and sets LdXFlag to "-x" or ""
622 # GNU ld supports input via a linker script, which is useful to avoid
623 # overflowing command-line length limits.
624 LdIsGNULd = @LdIsGNULd@
626 # On MSYS, building with SplitObjs=YES fails with
627 # ar: Bad file number
628 # see #3201. We need to specify a smaller max command-line size
629 # to work around it. 32767 doesn't work; 30000 does.
630 ifeq "$(Windows)" "YES"
631 XARGS = xargs -s 30000
637 # In emergency situations, REAL_SHELL is used to perform shell commands
638 # from within the ghc driver script, by scribbling the command line to
639 # a temp file and then having $(REAL_SHELL) execute it.
641 # The reason for having to do this is that overly long command lines
642 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
643 # 2.5.1), which is why this backdoor is provided. The situation of overly
644 # long command lines is either encountered while doing `make boot' in compiler/,
645 # or when linking the compiler binary (`hsc').
647 # We do not use SHELL to execute long commands, as `make' will more than likely
648 # override whatever setting you have in your environment while executing.
650 # By default, REAL_SHELL is set equal to SHELL, which is not really a smart move
651 # as it is SHELL that will show up the bogosity in the first place, but setting
652 # it to anything else isn't really portable.
654 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
655 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
665 HSCOLOUR = @HSCOLOUR@
668 # This is special to literate/, ToDo: add literate-specific
669 # configure setup to literate/.
674 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
682 GTK_CONFIG = @GTK_CONFIG@
684 # Set this if you want to use Inno Setup to build a Windows installer
685 # when you make a bindist
688 #-----------------------------------------------------------------------------
691 BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
692 BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
693 BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
694 DBLATEX = @DblatexCmd@
695 XSLTPROC = @XsltprocCmd@
696 XMLLINT = @XmllintCmd@
697 HAVE_DOCBOOK_XSL = @HAVE_DOCBOOK_XSL@
698 XSLTPROC_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
699 XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
700 --stringparam section.autolabel 1 \
701 --stringparam section.label.includes.component.label 1
703 #-----------------------------------------------------------------------------
704 # FPtools support software
711 GHC_PKG = @GhcPkgCmd@
716 GREENCARD = @GreenCardCmd@
717 GREENCARD_VERSION = @GreenCardVersion@
723 HAPPY_VERSION = @HappyVersion@
725 # Options to pass to Happy when we're going to compile the output with GHC
727 SRC_HAPPY_OPTS = -agc --strict
729 # Temp. to work around performance problems in the HEAD around 8/12/2003,
730 # A Happy compiled with this compiler needs more stack.
731 SRC_HAPPY_OPTS += +RTS -K2m -RTS
737 ALEX_VERSION = @AlexVersion@
739 # Options to pass to Happy when we're going to compile the output with GHC
745 # Should we build haddock docs?
747 # And HsColour the sources?
748 ifeq "$(HSCOLOUR)" ""
755 # Options for compiling in different `ways'.
757 # To configure up your own way, have a look at some of the standard ways
758 # such as profiling, and create your own set of WAY_*_OPTS defs below.
759 # After having done that, add your way string to WAYS, and after having
760 # run the configure script, the different projects will add the new way
761 # to the list of ways they support.
765 # Definitions of the different ways:
769 # - description, e.g., profiling
770 # * what they mean to the driver:
771 # - WAY_p_HC_OPTS gives the list of command-line options
776 # The ways currently defined.
778 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
779 USER_WAYS=a b c d e f g h j k l m n o A B
782 # The following ways currently have treated specially, p t mg,
783 # as the driver script treats these guys specially and needs to carefully be told
784 # about the options for these. Hence, we hide the required command line options
785 # for these in the driver, as this is the only place they are needed.
787 # If you want to add to these default options, fill in the variables below:
798 WAY_t_NAME=ticky-ticky profiling
799 WAY_t_HC_OPTS= -ticky
802 WAY_l_NAME=event logging
803 WAY_l_HC_OPTS= -eventlog
807 WAY_mp_HC_OPTS=-parallel
811 WAY_mg_HC_OPTS=-gransim
814 # These ways apply to the RTS only:
818 WAY_thr_NAME=threaded
819 WAY_thr_HC_OPTS=-optc-DTHREADED_RTS
822 WAY_thr_p_NAME=threaded profiled
823 WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof
826 WAY_thr_l_NAME=threaded event logging
827 WAY_thr_l_HC_OPTS=-optc-DTHREADED_RTS -eventlog
831 WAY_debug_HC_OPTS=-optc-DDEBUG
834 WAY_debug_p_NAME=debug profiled
835 WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
838 WAY_debug_t_NAME=debug ticky-ticky profiling
839 WAY_debug_t_HC_OPTS= -ticky -optc-DDEBUG
842 WAY_thr_debug_NAME=threaded
843 WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG
846 WAY_thr_debug_p_NAME=threaded debug profiling
847 WAY_thr_debug_p_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -prof
850 WAY_thr_debug_l_NAME=threaded debug event logging
851 WAY_thr_debug_l_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -eventlog
853 # Way 'dyn': build dynamic shared libraries
855 WAY_dyn_HC_OPTS=-fPIC -dynamic
858 WAY_thr_dyn_NAME=thr_dyn
859 WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
861 # Way 'thr_debug_dyn':
862 WAY_thr_debug_dyn_NAME=thr_dyn
863 WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
866 WAY_debug_dyn_NAME=thr_dyn
867 WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG
870 # Add user-way configurations here:
920 ################################################################################
922 # 31-bit-Int Core files
924 ################################################################################
927 # It is possible to configure the compiler and prelude to support 31-bit
928 # integers, suitable for a back-end and RTS using a tag bit on a 32-bit
929 # architecture. Currently the only useful output from this option is external Core
930 # files. The following additions to your build.mk will produce the
931 # 31-bit core output. Note that this is *not* just a library "way"; the
932 # compiler must be built a special way too.
934 # GhcCppOpts +=-DWORD_SIZE_IN_BITS=31
935 # GhcLibHcOpts +=-fext-core -fno-code -DWORD_SIZE_IN_BITS=31
936 # GhcLibCppOpts += -DWORD_SIZE_IN_BITS=31
939 ################################################################################
941 # Library configure arguments
943 ################################################################################
945 CONFIGURE_ARGS = @CONFIGURE_ARGS@
947 ################################################################################
949 # To be passed to sub-builds
951 ################################################################################
953 ICONV_INCLUDE_DIRS = @ICONV_INCLUDE_DIRS@
954 ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
956 ################################################################################
958 # Bindist testing directory
960 ################################################################################
962 ifeq "$(Windows)" "YES"
963 BIN_DIST_INST_SUBDIR = "install dir"
965 # I very much doubt that paths with spaces will work on Unix
966 BIN_DIST_INST_SUBDIR = installed
969 BIN_DIST_INST_DIR = $(TOP)/bindisttest/$(BIN_DIST_INST_SUBDIR)