4 #################################################################################
6 # config.mk.in-template
8 # This file defines all the variables that set the configuration of
12 #################################################################################
14 # The configuration is defined in two steps:
16 # 1. The builder (i.e. the person doing the build)
17 # copies this file, config.mk.in-template
20 # 2. S/he then edits it manually (gasp) to reflect any configuration
23 # 3. Then s/he runs "configure", which generates config.mk from
24 # config.mk.in, substituting for system/platform-dependent things
25 # enclosed in @at-signs@.
27 # This is one of only two files that configure generates (the other is config.h)
29 # Note that after subsequent edits of config.mk.in for a build, the configure script
30 # will have to be re-run manually to have the change reflected in config.mk.
33 # There is a section below for each project within the fptools suite
37 # a section corresponding to each of the main .mk files
38 # included by boilerplate.mk (see boilerplate.mk for a list).
42 #################################################################################
46 # Set of options applicable to all fptools projects
48 #################################################################################
51 # What parts to build: An fptools build tree does not have to be built
52 # all in one go. By setting the list of ProjectsToBuild in build.mk you can
53 # control which projects are built.
55 # Caution: the projects are built in the order given here, so if some
56 # projects use others you must list them in the correct order.
58 # Generally: * glafp-utils should be first
64 ProjectsToBuild = glafp-utils literate ghc hslibs
67 # Should the various project tests directories be built?
69 IncludeTestDirsInBuild=NO
71 #################################################################################
75 # Set of (configurable) options needed by the ghc tree
76 # plus their default options (if any).
78 #################################################################################
81 # Name variables for ghc:
83 GhcProjectName =The Glorious Glasgow Haskell Compilation System
84 GhcProjectNameShort =ghc
85 GhcProjectVersion =2.02
86 GhcProjectPatchLevel =0
87 GhcBuildeeVersion =202
91 # Name variables for the fptools, for now equal to the above
94 ProjectName =$(GhcProjectName)
95 ProjectNameShort =$(GhcProjectNameShort)
96 ProjectVersion =$(GhcProjectVersion)
97 ProjectPatchLevel =$(GhcProjectPatchLevel)
100 #---------------------------------------------------------------
102 # Variables that control how the compiler itself is built
104 # Specify the Haskell compiler to be used to compile the compiler itself
105 # WithGhcHc Path name of the compiler to use
106 # Ghc2_0 Whether this compiler is GHC 2.0 or later
107 # (which affects gruesome details about
108 # how mutually recursive modules are handled)
109 # WithGhcHcType What "type" of compiler is being used
118 # WithGhcHcType=HC_GLASGOW_GHC
120 # Extra ways in which to build the compiler (for example, you might want to
121 # build a profiled compiler so you can see where it spends its time)
124 # Extra option flags to pass to the compiler that compiles the compiler
125 # (Ones that are essential are wired into ghc/compiler/Makefile)
127 # -O compiler an optimised compiler
128 # -DDEBUG include consistency/assertion checks in the compiled compiler
129 # -fshow-import-specs show import specialisations
132 # GhcWithHscBuiltViaC - build GHC compiler proper (\`hsc') from .hc files?
133 GhcWithHscBuiltViaC=NO
135 # Build hsc with -O and turn optimising flag on when compiling
136 # the intermediate C file
137 GhcUseGccForOptAsm=YES
139 # Compile intermediate C file with debugging options set.
140 GhcUseGccForDebuggingAsm=YES
142 # Build a registerised version of hsc and runtime
143 # (you'd be desperate or silly not to).
144 GhcWithRegisterised=YES
146 # Build a compiler with a native code generator backend
147 # (as well as a C backend)
149 # Target platforms supported:
150 # i386, alpha & sparc
151 GhcWithNativeCodeGen=YES
153 # Build the compiler with the deforester included?
157 #---------------------------------------------------------------
159 # Variables that control how the prelude libararies and runtime system are built
161 # What extra ways to build the libraries in
162 # In addition to the normal sequential way, the default is to also build
163 # profiled prelude libraries.
166 # Option flags to pass to GHC when it's compiling prelude modules
167 # Typically these are things like -O or -dcore-lint
168 # The ones that are *essential* are wired into ghc/lib/Makefile
169 GhcLibHcOpts= -split-objs -odir $(basename $*)
172 #################################################################################
176 # Set of (configurable) options needed by the Haskell libraries (hslibs)
177 # plus their default options (if any).
179 #################################################################################
181 # Build the Haskell Readline bindings?
183 HsLibsWithReadline=NO
185 # Include path to readline.h
186 # (no path == in standard include path)
190 # Build the socket libraries?
192 HsLibsWithSockets=YES
195 # The different ways to build hslibs. Default is just to mirror
196 # what is done for the ghc prelude libraries.
198 HsLibWays=$(GhcLibWays)
200 # Option flags for hslibs are by default the same as for the options
201 # used for the prelude libs (see above).
202 HsLibHcOpts=$(GhcLibHcOpts)
204 #################################################################################
208 # Happy specific options
210 #################################################################################
214 #################################################################################
218 # Haggis specific options
220 #################################################################################
224 #################################################################################
228 # Green-card specific options
230 #################################################################################
233 #################################################################################
237 # nofib specific options
239 #################################################################################
242 # NoFibSubDirs controls which set of tests should be run
243 # You can run one or more of
252 NoFibSubDirs = imaginary spectral real GHC_ONLY PRIVATE
254 # The different ways to build nofib. Default is just to mirror
255 # what is done for the ghc prelude libraries.
257 NoFibWays=$(GhcLibWays)
259 # Haskell compiler options for nofib
262 # ==============================================================================
264 # END OF PROJECT-SPECIFIC STUFF
266 # Now come the generic configuration options
268 # ==============================================================================
270 #################################################################################
272 # Paths (see paths.mk)
274 #################################################################################
278 # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
280 FPTOOLS_TOP_ABS = @hardtop@
283 # Installation directories, we don't use half of these,
284 # but since the configure script has them on offer while
285 # passing through, we might as well set them.
288 exec_prefix = @exec_prefix@
291 libexecdir = @libexecdir@
293 sysconfdir = @datadir@
294 sharedstatedir = @sharedstatedir@
295 localstatedir = @localstatedir@
298 includedir = @includedir@
299 oldincludedir = @oldincludedir@
303 #################################################################################
305 # Utilities programs: flags
307 #################################################################################
309 # If you want to give any standard flags to pretty much any utility
310 # (see utils.mk for a complete list), by adding a line here
314 # where P is the utility. For example, to add -O to all Haskell
320 #################################################################################
324 #################################################################################
326 # A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
327 # specifier. E.g. sparc-sun-solaris2
329 HOSTPLATFORM = @HostPlatform@
330 TARGETPLATFORM = @TargetPlatform@
331 BUILDPLATFORM = @HostPlatform@
333 HostPlatform_CPP = @HostPlatform_CPP@
334 HostArch_CPP = @HostArch_CPP@
335 HostOS_CPP = @HostOS_CPP@
336 HostVendor_CPP = @HostVendor_CPP@
339 # ToDo: check if these can be purged now. -- sof
342 @HostPlatform_CPP@_HOST = 1
343 @HostPlatform_CPP@_TARGET = 1
344 @HostPlatform_CPP@_BUILD = 1
346 @HostArch_CPP@_HOST_ARCH = 1
347 @HostArch_CPP@_TARGET_ARCH = 1
348 @HostArch_CPP@_BUILD_ARCH = 1
350 @HostOS_CPP@_HOST_OS = 1
351 @HostOS_CPP@_TARGET_OS = 1
352 @HostOS_CPP@_BUILD_OS = 1
354 @HostVendor_CPP@_HOST_VENDOR = 1
355 @HostVendor_CPP@_TARGET_VENDOR = 1
356 @HostVendor_CPP@_BUILD_VENDOR = 1
358 # Leading underscores on symbol names in object files
359 # Valid options: YES/NO
361 LeadingUnderscore=@LeadingUnderscore@
363 #################################################################################
365 # Utilities programs: where to find them
367 #################################################################################
369 #-----------------------------------------------------------------------------
370 # FPtools Utility locations
372 # By default, the various utils needed to be build ghc and chums
373 # is set up to point to the utils/ directory. Define here the
374 # path prefix for the utilities. Notice that it's a prefix with
375 # a trailing slash, so that it can be concatenated directly on
376 # front of a program name; if it's not set then we just look
377 # along the shell's $(PATH)
379 # If instead you want to use installed or your own versions of these,
380 # override the various *_PREFIX in build.mk, i.e., having the following
385 # will force `make' to rummage around in your PATH to find `fastmake' (not
386 # sure it would need it in the first place, but still).
388 GLAFP_UTILS = $(FPTOOLS_TOP)/glafp-utils
390 SCRIPT_PREFIX = $(GLAFP_UTILS)/scripts/
391 FASTMAKE_PREFIX = $(GLAFP_UTILS)/fastmake/
392 MKDEPENDC_PREFIX = $(GLAFP_UTILS)/mkdependC/
393 LTX_PREFIX = $(GLAFP_UTILS)/ltx/
394 RUNTEST_PREFIX = $(GLAFP_UTILS)/runstdtest/
395 VERBATIM_PREFIX = $(GLAFP_UTILS)/verbatim/
396 ETAGS_PREFIX = $(GLAFP_UTILS)/etags/
397 MSUB_PREFIX = $(GLAFP_UTILS)/msub/
398 LNDIR_PREFIX = $(GLAFP_UTILS)/lndir/
399 MKDIRHIER_PREFIX = $(GLAFP_UTILS)/mkdirhier/
402 LITERATE = $(FPTOOLS_TOP)/literate
404 LITERATE_PREFIX = $(FPTOOLS_TOP)/literate/
405 INFO_PREFIX = $(FPTOOLS_TOP)/literate/info-utils/
406 TEXI2HTML_PREFIX = $(LITERATE_PREFIX)texi2html/
408 HAPPY_PREFIX = $(FPTOOLS_TOP)/happy/src/
410 UNLIT_PREFIX = $(FPTOOLS_TOP)/ghc/utils/unlit/
411 UGEN_PREFIX = $(FPTOOLS_TOP)/ghc/utils/ugen/
412 STAT2RESID_PREFIX = $(FPTOOLS_TOP)/ghc/utils/stat2resid/
413 HP2PS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
414 HSCPP_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hscpp/
415 HSTAGS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hstags/
418 #-----------------------------------------------------------------------------
419 # Haskell compiler and mkdependHS
421 HC = $(FPTOOLS_TOP)/ghc/driver/ghc
425 # The compiler proper is built with the 1.2 compiler,
426 # so when building the dependencies, we need mkdependHS
427 # for the 1.2 compiler.
429 MKDEPENDHS_1_2 = mkdependHS-1.2
431 #-----------------------------------------------------------------------------
437 WhatGccIsCalled = gcc
438 ifeq "$(strip $(HaveGcc))" "YES"
439 ifneq "$(strip $(UseGcc))" "YES"
442 CC = $(WhatGccIsCalled)
446 #-----------------------------------------------------------------------------
452 #-----------------------------------------------------------------------------
453 # Other standard (ha!) Unix utilities
456 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
457 BASH = /usr/local/bin/bash
459 # Could be either gzip or compress
461 COMPRESS = @CompressCmd@
462 COMPRESS_SUFFIX = @CompressSuffix@
464 CONTEXT_DIFF = @ContextDiffCmd@
479 PREPROCESSCMD = $(CC) -E
489 # This is special to literate/, ToDo: add literate-specific
490 # configure setup to literate/.
495 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
504 #-----------------------------------------------------------------------------
505 # FPtools support software
507 # Stuff from fptools/glafp-utils
508 MKDEPENDC = $(MKDEPENDC_PREFIX)mkdependC
509 FASTMAKE = $(FASTMAKE_PREFIX)fastmake
510 LTX = $(LTX_PREFIX)ltx
511 MKDIRHIER = $(MKDIRHIER_PREFIX)mkdirhier
512 LNDIR = $(LNDIR_PREFIX)lndir
513 MSUB = $(MSUB_PREFIX)msub
514 ETAGS = $(ETAGS_PREFIX)etags
515 VERBATIM = $(VERBATIM_PREFIX)verbatim
516 RUNTEST = $(RUNTEST_PREFIX)runstdtest
521 HAPPY = $(HAPPY_PREFIX)happy
525 # Stuff from fptools/literate
527 INFO = $(UTIL_PREFIX)info
528 MAKEINFO = $(INFO_PREFIX)makeinfo
529 POSTMAKEINFO = $(INFO_PREFIX)postmakeinfo
530 LIT2PGM = $(LITERATE_PREFIX)lit2pgm
531 LIT2TEXI = $(LITERATE_PREFIX)lit2texi
532 LIT2HTML = $(LITERATE_PREFIX)lit2html
533 LIT2LATEX = $(LITERATE_PREFIX)lit2latex
534 MKDEPENDLIT = $(LITERATE_PREFIX)mkdependlit
535 LIT2CHANGELOG = $(LITERATE_PREFIX)lit2changelog
536 LIT2TEXT = $(LITERATE_PREFIX)lit2text
537 TEXI2HTML = $(TEXI2HTML_PREFIX)texi2html
540 # Stuff from fptools/ghc/utils
542 UNLIT = $(UNLIT_PREFIX)unlit
543 UGEN = $(UGEN_PREFIX)ugen
544 STAT2RESID = $(STAT2RESID_PREFIX)stat2resid
545 HP2PS = $(HP2PS_PREFIX)hp2ps
546 HSCPP = $(HSCPP_PREFIX)hscpp
547 HSTAGS = $(HSTAGS_PREFIX)hstags
550 # Options for the compiling different `ways'. Various projects within
551 # the glorious fptools tree support building in various user-configured
552 # ways. For instance, you could set up one `way' such that the prelude
553 # libraries and hslibs all were built with the option -ffoldr-build-on.
555 # To configure up your own way, have a look at some of the standard ways
556 # such as profiling, and create your own set of WAY_*_OPTS defs below.
557 # After having done that, add your way string to WAYS, and after having
558 # run the configure script, the different projects will add the new way
559 # to the list of ways they support.
563 # IMPORTANT! The WAYS variable configures the different `ways'
564 # you want to build a project (or maybe just parts of it, as is
565 # the case for ghc/). This variable is intended set inside the
566 # project mk setup, enforcing a global fptools WAYS is a bit too
567 # much (do you *really* want to build glafp-utils the profiled-concurrent
572 # Definitions of the different ways:
576 # - description, e.g., profiling
577 # * what they mean to the driver:
578 # - WAY_p_HC_OPTS gives the list of command-line options
583 # The ways currently defined.
585 ALL_WAYS=p t u mc mr mt mp mg 1s 2s du a b c d e f g h i j k l m n o A B
588 # The following ways currently have treated specially, p u t mc mt my mp mg 1s 2d du,
589 # as the driver script treats these guys specially and needs to carefully be told
590 # about the options for these. Hence, we hide the required command line options
591 # for these in the ghc/driver, as this is the only place they are needed.
593 # If you want to add to these default options, fill in the variables below:
599 WAY_t_NAME=ticky-ticky profiling
600 WAY_t_HC_OPTS= -ticky
603 WAY_u_NAME=unregisterized (using portable C only)
606 # Way `mc': concurrent
607 WAY_mc_NAME=concurrent
608 WAY_mc_HC_OPTS=-concurrent
611 WAY_mr_NAME=profiled concurrent
612 WAY_mr_HC_OPTS=-prof -concurrent
615 WAY_mt_NAME=ticky-ticky concurrent
616 WAY_mt_HC_OPTS=-ticky -concurrent
620 WAY_mp_HC_OPTS=-parallel
626 WAY_mg_HC_OPTS=-gransim
629 # Ways for different garbage collectors
631 WAY_2s_NAME=2-space GC
634 WAY_1s_NAME=1-space GC
637 WAY_du_NAME=dual-mode GC
641 # Add user-way configurations here: