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 # (unregisterised only)
39 BootingFromHc = @BootingFromHc@
42 NO_INCLUDE_PKGDATA = NO
44 # Should we build latex docs?
47 # Mac OS X deployment target (to cross-compile for older OS versions)
49 MACOSX_DEPLOYMENT_VERSION = @MACOSX_DEPLOYMENT_VERSION@
50 MACOSX_DEPLOYMENT_SDK = @MACOSX_DEPLOYMENT_SDK@
52 ifneq "$(MACOSX_DEPLOYMENT_VERSION)" ""
53 MACOSX_DEPLOYMENT_CC_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
54 -isysroot $(MACOSX_DEPLOYMENT_SDK) \
56 MACOSX_DEPLOYMENT_LD_OPTS = -mmacosx-version-min=$(MACOSX_DEPLOYMENT_VERSION) \
57 -Wl,-syslibroot,$(MACOSX_DEPLOYMENT_SDK)
58 # We don't extend SRC_CC_OPTS and friends here directly, as (a) they may get
59 # overwritten in build.mk and (b) we must not use the deployment options in
60 # stage 1 or we get a linker error if the bootstrap compiler is for a more
63 # We need --no-builtin-fprintf, as the use of the builtin function optimisation
64 # for fprintf together with #include "PosixSource" in the RTS leads to the
65 # use of fwrite$UNIX2003 (with GCC 4.0.1 on Mac OS X 10.5.2).
68 ################################################################################
70 # Variables that control how the compiler itself is built
72 ################################################################################
74 # The compiler used to build GHC is $(GHC). To change the actual compiler
75 # used, re-configure with --with-ghc=<path-to-ghc>.
77 # Extra ways in which to build the compiler (for example, you might want to
78 # build a profiled compiler so you can see where it spends its time)
81 # Extra option flags to pass to the compiler that compiles the compiler
82 # (Ones that are essential are wired into compiler/Makefile)
83 # Typical options to use here:
85 # -DDEBUG include debugging code and assertions (will make the
86 # compiler slower and produce debugging output, but useful
89 # -dcore-lint check the types after every pass of the compiler;
90 # a pretty strong internal check of the compiler being
91 # used to compile GHC. Useful when bootstrapping.
92 GhcHcOpts=-Rghc-timing
94 # Extra options added to specific stages of the compiler bootstrap.
95 # These are placed later on the command line, and may therefore
96 # override options from $(GhcHcOpts).
103 GhcLibProfiled=$(if $(filter p,$(GhcLibWays)),YES,NO)
105 # Do we support shared libs?
106 PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),i386-unknown-linux x86_64-unknown-linux),YES,NO)
109 # BuildStaticLibs=@BuildStaticLibs@
111 # Build a compiler that will build *unregisterised* libraries and
112 # binaries by default. Unregisterised code is supposed to compile and
113 # run without any support for architecture-specific assembly mangling,
114 # register assignment or tail-calls, and is therefore a good way to get
115 # started when porting GHC to new architectures.
117 # If this is set to NO, you can still use the unregisterised way
118 # (way 'u') to get unregisterised code, but the default way will be
121 # NOTE: the stage1 compiler will be a registerised binary (assuming
122 # the compiler you build with is generating registerised binaries), but
123 # the stage2 compiler will be an unregisterised binary.
125 ifneq "$(findstring $(HostArch_CPP), alpha hppa)" ""
126 GhcUnregisterised=YES
131 # Build a compiler with a native code generator backend
132 # (as well as a C backend)
134 # Target platforms supported:
136 # AIX is not supported
137 ArchSupportsNCG=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc)))
138 OsSupportsNCG=$(strip $(patsubst $(HostOS_CPP), YES, $(patsubst aix,,$(HostOS_CPP))))
140 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
141 GhcWithNativeCodeGen=$(strip\
142 $(if $(filter YESYESNO,\
143 $(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)),YES,NO))
145 HaveLibDL = @HaveLibDL@
147 # ArchSupportsSMP should be set iff there is support for that arch in
149 ArchSupportsSMP=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 sparc powerpc)))
151 # lazy test, because $(GhcUnregisterised) might be set in build.mk later.
152 GhcWithSMP=$(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised)),YES,NO))
154 # Whether to include GHCi in the compiler. Depends on whether the RTS linker
155 # has support for this OS/ARCH combination.
157 OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)))
158 ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 x86_64 powerpc sparc sparc64)))
160 ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
161 GhcWithInterpreter=YES
163 GhcWithInterpreter=NO
166 # GhcEnableTablesNextToCode tells us whether the target architecture
167 # supports placing info tables directly before the entry code
168 # (see TABLES_NEXT_TO_CODE in the RTS). Whether we actually compile for
169 # TABLES_NEXT_TO_CODE depends on whether we're building unregisterised
170 # code or not, which may be decided by options to the compiler later.
171 ifneq "$(findstring $(TargetArch_CPP)X, ia64X powerpc64X)" ""
172 GhcEnableTablesNextToCode=NO
174 GhcEnableTablesNextToCode=YES
177 # Whether to use libffi for adjustors (foreign import "wrapper") or
178 # not. If we have built-in support (rts/Adjustor.c) then we use that,
179 # otherwise we fall back on libffi, which is slightly slower.
180 ArchHasAdjustorSupport=$(strip $(if $(findstring $(HostArch_CPP),i386 x86_64 alpha powerpc ia64,),YES,NO))
181 ifeq "$(ArchHasAdjustorSupport)" "YES"
182 UseLibFFIForAdjustors=NO
184 UseLibFFIForAdjustors=YES
187 # On Windows we normally want to make a relocatable bindist, to we
188 # ignore flags like libdir
189 ifeq "$(Windows)" "YES"
190 RelocatableBuild = YES
192 RelocatableBuild = NO
195 # When building bindists we set this to yes so that the binaries are as
196 # portable as possible.
200 # Building various ways?
201 # (right now, empty if not).
202 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
203 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
205 #------------------------------------------------------------------------------
206 # Options for Libraries
208 # Which directory (in libraries/) contains the integer library?
209 INTEGER_LIBRARY=integer-gmp
211 # We build the libraries at least the "vanilla" way (way "v")
214 # In addition to the normal sequential way, the default is to also build
215 # profiled prelude libraries unless we are booting from .hc files
216 ifneq "$(BootingFromHc)" "YES"
220 ifeq "$(PlatformSupportsSharedLibs)" "YES"
224 # Handy way to test whether we're building shared libs or not.
225 BuildSharedLibs=$(strip $(if $(findstring dyn,$(GhcLibWays)),YES,NO))
227 # In addition, the RTS is built in some further variations. Ways that
231 # thr_p : threaded profiled
232 # debug : debugging (compile with -g for the C compiler, and -DDEBUG)
233 # debug_p : debugging profiled
234 # thr_debug : debugging threaded
235 # thr_debug_p : debugging threaded profiled
236 # t : ticky-ticky profiling
237 # debug_t : debugging ticky-ticky profiling
239 # thr_l : threaded and event logging
243 # Usually want the debug version
244 ifeq "$(BootingFromHc)" "NO"
248 # Want the threaded versions unless we're unregisterised
249 # Defer the check until later by using $(if..), because GhcUnregisterised might
250 # be set in build.mk, which hasn't been read yet.
251 GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_debug thr_l,)
252 GhcRTSWays += $(if $(findstring p, $(GhcLibWays)),$(if $(findstring NO, $(GhcUnregisterised)),thr_p,),)
253 GhcRTSWays += $(if $(findstring dyn, $(GhcLibWays)), dyn debug_dyn $(if $(findstring NO, $(GhcUnregisterised)),thr_dyn thr_debug_dyn),)
255 # We can only build GHCi threaded if we have a threaded RTS:
256 GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO)
258 # Option flags to pass to GHC when it's compiling modules in
259 # fptools/libraries. Typically these are things like -O or
260 # -dcore-lint or -H32m. The ones that are *essential* are wired into
263 # -O(2) is pretty desirable, otherwise no inlining of prelude
264 # things (incl "+") happens when compiling with this compiler
266 # -XGenerics switches on generation of support code for
267 # derivable type classes. This is now off by default,
268 # but we switch it on for the libraries so that we generate
269 # the code in case someone importing wants it
271 GhcLibHcOpts=-O2 -XGenerics
273 # Win32 only: Enable the RTS and libraries to be built as DLLs
274 DLLized=@EnableWin32DLLs@
276 # Strip local symbols from libraries? This can make the libraries smaller,
277 # but makes debugging somewhat more difficult. Doesn't work with all ld's.
281 # These are the URL patterns that Haddock uses to generate the "Source
282 # File" links on each page.
283 PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
285 # ----------------------------------------------------------------------------
286 # Object-file splitting
288 # Set SplitObjs=YES or NO in your build.mk
290 # Don't use -split-objs in in GhcLibHcOpts, because the build
291 # system needs to do other special magic if you are
292 # doing object-file splitting
294 ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))
296 # lazy test, so that $(GhcUnregisterised) can be set in build.mk
297 SupportsSplitObjs=$(strip $(if $(filter YES,$(ArchSupportsSplitObjs)),\
298 $(if $(filter NO,$(BootingFromHc)),\
299 $(if $(filter NO,$(GhcUnregisterised)),\
305 # By default, enable SplitObjs for the libraries if this build supports it
306 SplitObjs=$(SupportsSplitObjs)
311 # .NET interop support?
315 # Build unix package?
317 GhcLibsWithUnix=@GhcLibsWithUnix@
321 # ----------------------------------------------------------------------------
322 # Options for GHC's RTS
324 # For an optimised RTS (you probably don't want to change these; we build
325 # a debugging RTS by default now. Use -debug to get it).
326 GhcRtsHcOpts=-optc-O2
327 GhcRtsCcOpts=-fomit-frame-pointer
329 # Include the front panel code? Needs GTK+.
330 GhcRtsWithFrontPanel = NO
332 # Include support for CPU performance counters via the PAPI library in the RTS?
333 # (PAPI: http://icl.cs.utk.edu/papi/)
338 ################################################################################
340 # Paths (see paths.mk)
342 ################################################################################
344 # Directory used by GHC (and possibly other tools) for storing
345 # temporary files. If your TMPDIR isn't big enough, either override
346 # this in build.mk or set your environment variable "TMPDIR" to point
347 # to somewhere with more space. (TMPDIR=. is a good choice).
349 # DEFAULT_TMPDIR isn't called TMPDIR because GNU make tends to
350 # override an environment variable with the value of the make variable
351 # of the same name (if it exists) when executing sub-processes, so
352 # setting the TMPDIR env var would have no effect in the build tree.
354 DEFAULT_TMPDIR = /tmp
355 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
356 DEFAULT_TMPDIR = /C/TEMP
358 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
359 DEFAULT_TMPDIR = /C/TEMP
362 BIN_DIST_TOPDIR_ABS=$(TOP)
363 BIN_DIST_DIR=$(BIN_DIST_TOPDIR_ABS)/$(BIN_DIST_NAME)
365 BIN_DIST_NAME=ghc-$(ProjectVersion)
366 BIN_DIST_TAR=$(TOP)/$(BIN_DIST_NAME)-$(TARGETPLATFORM).tar
367 BIN_DIST_TAR_BZ2=$(BIN_DIST_TAR).bz2
368 BIN_DIST_PREP_DIR=$(TOP)/bindist-prep
369 BIN_DIST_PREP=$(BIN_DIST_PREP_DIR)/$(BIN_DIST_NAME)
370 BIN_DIST_LIST=$(TOP)/bindist-list
372 WINDOWS_INSTALLER_BASE = ghc-$(ProjectVersion)-i386-windows
373 WINDOWS_INSTALLER = $(WINDOWS_INSTALLER_BASE)$(exeext)
375 # -----------------------------------------------------------------------------
376 # Utilities programs: flags
378 # If you want to give any standard flags to pretty much any utility
379 # (see utils.mk for a complete list), by adding a line here
383 # where P is the utility. For example, to add -O to all Haskell
388 SRC_HC_OPTS += -H32m -O
390 # These flags make flex 8-bit
393 # Default fptools options for dllwrap.
394 SRC_BLD_DLL_OPTS += --target=i386-mingw32
396 # Flags for CPP when running GreenCard on .pgc files
397 GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
400 # -----------------------------------------------------------------------------
401 # Names of programs in the GHC tree
403 # xxx_PGM the name of an executable, without the path
404 # xxx the executable relative to the current dir
406 GHC_UNLIT_PGM = unlit$(exeext)
407 GHC_HP2PS_PGM = hp2ps$(exeext)
408 GHC_GHCTAGS_PGM = ghctags$(exeext)
409 GHC_HSC2HS_PGM = hsc2hs$(exeext)
410 GHC_TOUCHY_PGM = touchy$(exeext)
411 GHC_MANGLER_PGM = ghc-asm
412 GHC_SPLIT_PGM = ghc-split
413 GHC_SYSMAN_PGM = SysMan
414 GHC_GENPRIMOP_PGM = genprimopcode$(exeext)
415 GHC_GENAPPLY_PGM = genapply$(exeext)
416 GHC_CABAL_PGM = ghc-cabal$(exeext)
417 GHC_PKG_PGM = ghc-pkg$(exeext)
418 GHC_MKDEPENDC_PGM = mkdependC
419 GHC_LTX_PGM = ltx$(exeext)
420 GHC_MKDIRHIER_PGM = mkdirhier
421 GHC_LNDIR_PGM = lndir
422 GHC_DUMMY_GHC_PGM = dummy-ghc$(exeext)
424 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
432 HP2PS = $(GHC_HP2PS_DIR)/$(GHC_HP2PS_PGM)
433 MANGLER = $(INPLACE_LIB)/$(GHC_MANGLER_PGM)
434 SPLIT = $(INPLACE_LIB)/$(GHC_SPLIT_PGM)
435 SYSMAN = $(GHC_SYSMAN_DIR)/$(GHC_SYSMAN_PGM)
436 LTX = $(GHC_LTX_DIR)/$(GHC_LTX_PGM)
437 LNDIR = $(GHC_LNDIR_DIR)/$(GHC_LNDIR_PGM)
439 UNLIT = $(INPLACE_LIB)/$(GHC_UNLIT_PGM)
440 TOUCHY = $(INPLACE_LIB)/$(GHC_TOUCHY_PGM)
441 MKDIRHIER = $(INPLACE_BIN)/$(GHC_MKDIRHIER_PGM)
442 MKDEPENDC = $(INPLACE_BIN)/$(GHC_MKDEPENDC_PGM)
443 GHC_CABAL_INPLACE = $(INPLACE_BIN)/$(GHC_CABAL_PGM)
444 GENAPPLY_INPLACE = $(INPLACE_BIN)/$(GHC_GENAPPLY_PGM)
445 GHC_PKG_INPLACE = $(INPLACE_BIN)/$(GHC_PKG_PGM)
446 GHCTAGS_INPLACE = $(INPLACE_BIN)/$(GHC_GHCTAGS_PGM)
447 HSC2HS_INPLACE = $(INPLACE_BIN)/$(GHC_HSC2HS_PGM)
448 GENPRIMOP_INPLACE = $(INPLACE_BIN)/$(GHC_GENPRIMOP_PGM)
449 DUMMY_GHC_INPLACE = $(INPLACE_BIN)/$(GHC_DUMMY_GHC_PGM)
451 GENERATED_FILE = chmod a-w
452 EXECUTABLE_FILE = chmod +x
454 #-----------------------------------------------------------------------------
455 # Haskell compilers and mkdependHS
457 # $(GHC), $(HBC) and $(NHC) point to installed versions of the relevant
458 # compilers, if available.
460 # $(HC) is a generic Haskell 98 compiler, set to $(GHC) by default.
461 # $(MKDEPENDHS) is the Haskell dependency generator (ghc -M).
463 # NOTE: Don't override $(GHC) in build.mk, use configure --with-ghc instead
464 # (because the version numbers have to be calculated).
467 # If we have a make dependency on c:/ghc/ghc, and the file is actually
468 # called c:/ghc/ghc.exe, then make will think that ghc doesn't exist
469 # and that it doesn't know how to create it.
470 ifneq "$(wildcard $(GHC).exe)" ""
474 GhcDir = $(dir $(GHC))
476 # Set to YES if $(GHC) has the editline package installed
477 GhcHasEditline = @GhcHasEditline@
482 # Sometimes we want to invoke ghc from the build tree in different
483 # places (eg. it's handy to have a nofib & a ghc build in the same
484 # tree). We can refer to "this ghc" as $(GHC_INPLACE):
486 GHC_INPLACE = $(GHC_STAGE1)
488 GHC_STAGE0_ABS = $(GHC)
489 GHC_STAGE1_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage1$(exeext)
490 GHC_STAGE2_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage2$(exeext)
491 GHC_STAGE3_ABS = $(TOP)/$(INPLACE_BIN)/ghc-stage3$(exeext)
494 GHC_STAGE1 = $(INPLACE_BIN)/ghc-stage1$(exeext)
495 GHC_STAGE2 = $(INPLACE_BIN)/ghc-stage2$(exeext)
496 GHC_STAGE3 = $(INPLACE_BIN)/ghc-stage3$(exeext)
498 # Install stage 2 by default, can be changed to 3
501 BOOTSTRAPPING_CONF = libraries/bootstrapping.conf
503 INPLACE_PACKAGE_CONF = $(INPLACE_LIB)/package.conf.d
505 GhcVersion = @GhcVersion@
506 GhcPatchLevel = @GhcPatchLevel@
507 GhcMajVersion = @GhcMajVersion@
508 GhcMinVersion = @GhcMinVersion@
510 ghc_ge_609 = @ghc_ge_609@
512 # Canonicalised ghc version number, used for easy (integer) version
513 # comparisons. We must expand $(GhcMinVersion) to two digits by
514 # adding a leading zero if necessary:
515 ifneq "$(findstring $(GhcMinVersion), 0 1 2 3 4 5 6 7 8 9)" ""
516 GhcCanonVersion = $(GhcMajVersion)0$(GhcMinVersion)
518 GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
521 #-----------------------------------------------------------------------------
524 # NB. Don't override $(WhatGccIsCalled) using build.mk, re-configure using
525 # the flag --with-gcc=<blah> instead. The reason is that the configure script
526 # needs to know which gcc you're using in order to perform its tests.
530 WhatGccIsCalled = @WhatGccIsCalled@
531 GccVersion = @GccVersion@
533 ifeq "$(strip $(HaveGcc))" "YES"
534 ifneq "$(strip $(UseGcc))" "YES"
537 CC = $(WhatGccIsCalled)
541 # C compiler and linker flags from configure (e.g. -m<blah> to select
542 # correct C compiler backend).
543 CONF_CC_OPTS = @CONF_CC_OPTS@
544 CONF_LD_OPTS = @CONF_LD_OPTS@
546 ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
550 SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
551 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
553 #-----------------------------------------------------------------------------
556 HaveLibMingwEx = @HaveLibMingwEx@
558 #-----------------------------------------------------------------------------
559 # Flex (currently unused, could be moved to glafp-utils)
562 # Don't bother with -lfl, we define our own yywrap()s anyway.
564 #WAS:FLEX_LIB = @LEXLIB@
566 #-----------------------------------------------------------------------------
567 # Other standard (ha!) Unix utilities
570 ArSupportsInput = @ArSupportsInput@
571 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
572 BASH = /usr/local/bin/bash
574 CONTEXT_DIFF = @ContextDiffCmd@
576 CPP = @CPP@ @CPPFLAGS@
579 # RAWCPP_FLAGS are the flags to give to cpp (viz, gcc -E) to persuade it to
580 # behave plausibly on Haskell sources.
582 RAWCPP_FLAGS = -undef -traditional
587 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
588 # install-sh script (if chosen). This not terribly useful to us, so we convert
589 # it into an abs. path.
591 INSTALL := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
603 PREPROCESSCMD = $(CC) -E
610 # Some ld's support the -x flag and some don't, so the configure
611 # script detects which we have and sets LdXFlag to "-x" or ""
615 # GNU ld supports input via a linker script, which is useful to avoid
616 # overflowing command-line length limits.
617 LdIsGNULd = @LdIsGNULd@
619 # On MSYS, building with SplitObjs=YES fails with
620 # ar: Bad file number
621 # see #3201. We need to specify a smaller max command-line size
622 # to work around it. 32767 doesn't work; 30000 does.
623 ifeq "$(Windows)" "YES"
624 XARGS = xargs -s 30000
630 # In emergency situations, REAL_SHELL is used to perform shell commands
631 # from within the ghc driver script, by scribbling the command line to
632 # a temp file and then having $(REAL_SHELL) execute it.
634 # The reason for having to do this is that overly long command lines
635 # cause unnecessary trouble with some shells (e.g., /bin/sh on Solaris
636 # 2.5.1), which is why this backdoor is provided. The situation of overly
637 # long command lines is either encountered while doing `make boot' in compiler/,
638 # or when linking the compiler binary (`hsc').
640 # We do not use SHELL to execute long commands, as `make' will more than likely
641 # override whatever setting you have in your environment while executing.
643 # By default, REAL_SHELL is set equal to SHELL, which is not really a smart move
644 # as it is SHELL that will show up the bogosity in the first place, but setting
645 # it to anything else isn't really portable.
647 # ====> If long command lines cause you trouble, invoke `ghc' (via `make' or otherwise)
648 # with REAL_SHELL set to something else than /bin/sh, for instance, your favourite
658 HSCOLOUR = @HSCOLOUR@
661 # This is special to literate/, ToDo: add literate-specific
662 # configure setup to literate/.
667 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
675 GTK_CONFIG = @GTK_CONFIG@
677 # Set this if you want to use Inno Setup to build a Windows installer
678 # when you make a bindist
681 #-----------------------------------------------------------------------------
684 BUILD_DOCBOOK_HTML = @BUILD_DOCBOOK_HTML@
685 BUILD_DOCBOOK_PS = @BUILD_DOCBOOK_PS@
686 BUILD_DOCBOOK_PDF = @BUILD_DOCBOOK_PDF@
687 DBLATEX = @DblatexCmd@
688 XSLTPROC = @XsltprocCmd@
689 XMLLINT = @XmllintCmd@
690 HAVE_DOCBOOK_XSL = @HAVE_DOCBOOK_XSL@
691 XSLTPROC_HTML_STYLESHEET = http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
692 XSLTPROC_LABEL_OPTS = --stringparam toc.section.depth 3 \
693 --stringparam section.autolabel 1 \
694 --stringparam section.label.includes.component.label 1
696 #-----------------------------------------------------------------------------
697 # FPtools support software
704 GHC_PKG = @GhcPkgCmd@
709 GREENCARD = @GreenCardCmd@
710 GREENCARD_VERSION = @GreenCardVersion@
716 HAPPY_VERSION = @HappyVersion@
718 # Options to pass to Happy when we're going to compile the output with GHC
720 SRC_HAPPY_OPTS = -agc --strict
722 # Temp. to work around performance problems in the HEAD around 8/12/2003,
723 # A Happy compiled with this compiler needs more stack.
724 SRC_HAPPY_OPTS += +RTS -K2m -RTS
730 ALEX_VERSION = @AlexVersion@
732 # Options to pass to Happy when we're going to compile the output with GHC
738 # Should we build haddock docs?
740 # And HsColour the sources?
741 ifeq "$(HSCOLOUR)" ""
748 # Options for compiling in different `ways'.
750 # To configure up your own way, have a look at some of the standard ways
751 # such as profiling, and create your own set of WAY_*_OPTS defs below.
752 # After having done that, add your way string to WAYS, and after having
753 # run the configure script, the different projects will add the new way
754 # to the list of ways they support.
758 # Definitions of the different ways:
762 # - description, e.g., profiling
763 # * what they mean to the driver:
764 # - WAY_p_HC_OPTS gives the list of command-line options
769 # The ways currently defined.
771 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 debug_p thr_debug_p
774 # The following ways currently have treated specially, p t mg,
775 # as the driver script treats these guys specially and needs to carefully be told
776 # about the options for these. Hence, we hide the required command line options
777 # for these in the driver, as this is the only place they are needed.
779 # If you want to add to these default options, fill in the variables below:
790 WAY_t_NAME=ticky-ticky profiling
791 WAY_t_HC_OPTS= -ticky
794 WAY_l_NAME=event logging
795 WAY_l_HC_OPTS= -eventlog
799 WAY_mp_HC_OPTS=-parallel
803 WAY_mg_HC_OPTS=-gransim
806 # These ways apply to the RTS only:
810 WAY_thr_NAME=threaded
811 WAY_thr_HC_OPTS=-optc-DTHREADED_RTS
814 WAY_thr_p_NAME=threaded profiled
815 WAY_thr_p_HC_OPTS=-optc-DTHREADED_RTS -prof
818 WAY_thr_l_NAME=threaded event logging
819 WAY_thr_l_HC_OPTS=-optc-DTHREADED_RTS -eventlog
823 WAY_debug_HC_OPTS=-optc-DDEBUG
826 WAY_debug_p_NAME=debug profiled
827 WAY_debug_p_HC_OPTS=-optc-DDEBUG -prof
830 WAY_debug_t_NAME=debug ticky-ticky profiling
831 WAY_debug_t_HC_OPTS= -ticky -optc-DDEBUG
834 WAY_thr_debug_NAME=threaded
835 WAY_thr_debug_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG
838 WAY_thr_debug_p_NAME=threaded debug profiling
839 WAY_thr_debug_p_HC_OPTS=-optc-DTHREADED_RTS -optc-DDEBUG -prof
841 # Way 'dyn': build dynamic shared libraries
843 WAY_dyn_HC_OPTS=-fPIC -dynamic
846 WAY_thr_dyn_NAME=thr_dyn
847 WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
849 # Way 'thr_debug_dyn':
850 WAY_thr_debug_dyn_NAME=thr_dyn
851 WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG
854 WAY_debug_dyn_NAME=thr_dyn
855 WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG
857 ################################################################################
859 # 31-bit-Int Core files
861 ################################################################################
864 # It is possible to configure the compiler and prelude to support 31-bit
865 # integers, suitable for a back-end and RTS using a tag bit on a 32-bit
866 # architecture. Currently the only useful output from this option is external Core
867 # files. The following additions to your build.mk will produce the
868 # 31-bit core output. Note that this is *not* just a library "way"; the
869 # compiler must be built a special way too.
871 # GhcCppOpts +=-DWORD_SIZE_IN_BITS=31
872 # GhcLibHcOpts +=-fext-core -fno-code -DWORD_SIZE_IN_BITS=31
873 # GhcLibCppOpts += -DWORD_SIZE_IN_BITS=31
876 ################################################################################
878 # Library configure arguments
880 ################################################################################
882 CONFIGURE_ARGS = @CONFIGURE_ARGS@
884 ################################################################################
886 # To be passed to sub-builds
888 ################################################################################
890 ICONV_INCLUDE_DIRS = @ICONV_INCLUDE_DIRS@
891 ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
893 ################################################################################
895 # Bindist testing directory
897 ################################################################################
899 ifeq "$(Windows)" "YES"
900 BIN_DIST_INST_SUBDIR = "install dir"
902 # I very much doubt that paths with spaces will work on Unix
903 BIN_DIST_INST_SUBDIR = installed
906 BIN_DIST_INST_DIR = $(TOP)/bindisttest/$(BIN_DIST_INST_SUBDIR)