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=YES
185 # Build the socket libraries?
187 HsLibsWithSockets=YES
190 # The different ways to build hslibs. Default is just to mirror
191 # what is done for the ghc prelude libraries.
193 HsLibWays=$(GhcLibWays)
196 #################################################################################
200 # Happy specific options
202 #################################################################################
206 #################################################################################
210 # Haggis specific options
212 #################################################################################
216 #################################################################################
220 # Green-card specific options
222 #################################################################################
225 #################################################################################
229 # nofib specific options
231 #################################################################################
234 # NoFibSubDirs controls which set of tests should be run
235 # You can run one or more of
244 NoFibSubDirs = imaginary spectral real GHC_ONLY PRIVATE
246 # The different ways to build nofib. Default is just to mirror
247 # what is done for the ghc prelude libraries.
249 NoFibWays=$(GhcLibWays)
251 # Haskell compiler options for nofib
254 # ==============================================================================
256 # END OF PROJECT-SPECIFIC STUFF
258 # Now come the generic configuration options
260 # ==============================================================================
262 #################################################################################
264 # Paths (see paths.mk)
266 #################################################################################
268 # These variables are all ":=" variables so that you can easily attach
269 # extra stuff to the end of them, like this:
271 # libdir := $(libdir)/ghc
275 # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
277 FPTOOLS_TOP_ABS := @hardtop@
280 # Installation directories, we don't use half of these,
281 # but since the configure script has them on offer while
282 # passing through, we might as well set them.
285 exec_prefix := @exec_prefix@
288 libexecdir := @libexecdir@
290 sysconfdir := @datadir@
291 sharedstatedir := @sharedstatedir@
292 localstatedir := @localstatedir@
295 includedir := @includedir@
296 oldincludedir := @oldincludedir@
300 #################################################################################
302 # Utilities programs: flags
304 #################################################################################
306 # If you want to give any standard flags to pretty much any utility
307 # (see utils.mk for a complete list), by adding a line here
311 # where P is the utility. For example, to add -O to all Haskell
317 #################################################################################
321 #################################################################################
323 # A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
324 # specifier. E.g. sparc-sun-solaris2
326 HOSTPLATFORM = @HostPlatform@
327 TARGETPLATFORM = @TargetPlatform@
328 BUILDPLATFORM = @HostPlatform@
330 HostPlatform_CPP = @HostPlatform_CPP@
331 HostArch_CPP = @HostArch_CPP@
332 HostOS_CPP = @HostOS_CPP@
333 HostVendor_CPP = @HostVendor_CPP@
336 # ToDo: check if these can be purged now. -- sof
339 @HostPlatform_CPP@_HOST = 1
340 @HostPlatform_CPP@_TARGET = 1
341 @HostPlatform_CPP@_BUILD = 1
343 @HostArch_CPP@_HOST_ARCH = 1
344 @HostArch_CPP@_TARGET_ARCH = 1
345 @HostArch_CPP@_BUILD_ARCH = 1
347 @HostOS_CPP@_HOST_OS = 1
348 @HostOS_CPP@_TARGET_OS = 1
349 @HostOS_CPP@_BUILD_OS = 1
351 @HostVendor_CPP@_HOST_VENDOR = 1
352 @HostVendor_CPP@_TARGET_VENDOR = 1
353 @HostVendor_CPP@_BUILD_VENDOR = 1
355 # Leading underscores on symbol names in object files
356 # Valid options: YES/NO
358 LeadingUnderscore=@LeadingUnderscore@
360 #################################################################################
362 # Utilities programs: where to find them
364 #################################################################################
366 #-----------------------------------------------------------------------------
367 # FPtools Utility locations
369 # By default, the various utils needed to be build ghc and chums
370 # is set up to point to the utils/ directory. Define here the
371 # path prefix for the utilities. Notice that it's a prefix with
372 # a trailing slash, so that it can be concatenated directly on
373 # front of a program name; if it's not set then we just look
374 # along the shell's $(PATH)
376 # If instead you want to use installed or your own versions of these,
377 # override the various *_PREFIX in build.mk, i.e., having the following
382 # will force `make' to rummage around in your PATH to find `fastmake' (not
383 # sure it would need it in the first place, but still).
385 GLAFP_UTILS = $(FPTOOLS_TOP)/glafp-utils
387 SCRIPT_PREFIX = $(GLAFP_UTILS)/scripts/
388 FASTMAKE_PREFIX = $(GLAFP_UTILS)/fastmake/
389 MKDEPENDC_PREFIX = $(GLAFP_UTILS)/mkdependC/
390 LTX_PREFIX = $(GLAFP_UTILS)/ltx/
391 RUNTEST_PREFIX = $(GLAFP_UTILS)/runstdtest/
392 VERBATIM_PREFIX = $(GLAFP_UTILS)/verbatim/
393 ETAGS_PREFIX = $(GLAFP_UTILS)/etags/
394 MSUB_PREFIX = $(GLAFP_UTILS)/msub/
395 LNDIR_PREFIX = $(GLAFP_UTILS)/lndir/
396 MKDIRHIER_PREFIX = $(GLAFP_UTILS)/mkdirhier/
399 LITERATE = $(FPTOOLS_TOP)/literate
401 LITERATE_PREFIX = $(FPTOOLS_TOP)/literate/
402 TEXI2HTML_PREFIX = $(LITERATE_PREFIX)texi2html/
404 HAPPY_PREFIX = $(FPTOOLS_TOP)/happy/src/
406 UNLIT_PREFIX = $(FPTOOLS_TOP)/ghc/utils/unlit/
407 UGEN_PREFIX = $(FPTOOLS_TOP)/ghc/utils/ugen/
408 STAT2RESID_PREFIX = $(FPTOOLS_TOP)/ghc/utils/stat2resid/
409 HP2PS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
410 HSCPP_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hscpp/
411 HSTAGS_PREFIX = $(FPTOOLS_TOP)/ghc/utils/hstags/
414 #-----------------------------------------------------------------------------
415 # Haskell compiler and mkdependHS
417 HC = $(FPTOOLS_TOP)/ghc/driver/ghc
421 # The compiler proper is built with the 1.2 compiler,
422 # so when building the dependencies, we need mkdependHS
423 # for the 1.2 compiler.
425 MKDEPENDHS_1_2 = mkdependHS-1.2
427 #-----------------------------------------------------------------------------
433 WhatGccIsCalled = gcc
434 ifeq "$(strip $(HaveGcc))" "YES"
435 ifneq "$(strip $(UseGcc))" "YES"
438 CC = $(WhatGccIsCalled)
442 #-----------------------------------------------------------------------------
448 #-----------------------------------------------------------------------------
449 # Other standard (ha!) Unix utilities
452 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
453 BASH = /usr/local/bin/bash
455 # Could be either gzip or compress
457 COMPRESS = @CompressCmd@
458 COMPRESS_SUFFIX = @CompressSuffix@
460 CONTEXT_DIFF = @ContextDiffCmd@
475 PREPROCESSCMD = $(CC) -E
485 # This is special to literate/, ToDo: add literate-specific
486 # configure setup to literate/.
491 TGRIND_HELPER = /usr/local/lib/tgrind/tfontedpr # XXX
500 #-----------------------------------------------------------------------------
501 # FPtools support software
503 # Stuff from fptools/glafp-utils
504 MKDEPENDC = $(MKDEPENDC_PREFIX)mkdependC
505 FASTMAKE = $(FASTMAKE_PREFIX)fastmake
506 LTX = $(LTX_PREFIX)ltx
507 MKDIRHIER = $(MKDIRHIER_PREFIX)mkdirhier
508 LNDIR = $(LNDIR_PREFIX)lndir
509 MSUB = $(MSUB_PREFIX)msub
510 ETAGS = $(ETAGS_PREFIX)etags
511 VERBATIM = $(VERBATIM_PREFIX)verbatim
512 RUNTEST = $(RUNTEST_PREFIX)runstdtest
517 HAPPY = $(HAPPY_PREFIX)happy
521 # Stuff from fptools/literate
523 INFO = $(UTIL_PREFIX)info
524 MAKEINFO = $(INFO_PREFIX)makeinfo
525 POSTMAKEINFO = $(INFO_PREFIX)postmakeinfo
526 LIT2PGM = $(LITERATE_PREFIX)lit2pgm
527 LIT2TEXI = $(LITERATE_PREFIX)lit2texi
528 LIT2HTML = $(LITERATE_PREFIX)lit2html
529 LIT2LATEX = $(LITERATE_PREFIX)lit2latex
530 MKDEPENDLIT = $(LITERATE_PREFIX)mkdependlit
531 LIT2CHANGELOG = $(LITERATE_PREFIX)lit2changelog
532 LIT2TEXT = $(LITERATE_PREFIX)lit2text
533 TEXI2HTML = $(TEXI2HTML_PREFIX)texi2html
536 # Stuff from fptools/ghc/utils
538 UNLIT = $(UNLIT_PREFIX)unlit
539 UGEN = $(UGEN_PREFIX)ugen
540 STAT2RESID = $(STAT2RESID_PREFIX)stat2resid
541 HP2PS = $(HP2PS_PREFIX)hp2ps
542 HSCPP = $(HSCPP_PREFIX)hscpp
543 HSTAGS = $(HSTAGS_PREFIX)hstags
546 # Options for the compiling different `ways'. Various projects within
547 # the glorious fptools tree support building in various user-configured
548 # ways. For instance, you could set up one `way' such that the prelude
549 # libraries and hslibs all were built with the option -ffoldr-build-on.
551 # To configure up your own way, have a look at some of the standard ways
552 # such as profiling, and create your own set of WAY_*_OPTS defs below.
553 # After having done that, add your way string to WAYS, and after having
554 # run the configure script, the different projects will add the new way
555 # to the list of ways they support.
559 # IMPORTANT! The WAYS variable configures the different `ways'
560 # you want to build a project (or maybe just parts of it, as is
561 # the case for ghc/). This variable is intended set inside the
562 # project mk setup, enforcing a global fptools WAYS is a bit too
563 # much (do you *really* want to build glafp-utils the profiled-concurrent
568 # Definitions of the different ways:
572 # - description, e.g., profiling
573 # * what they mean to the driver:
574 # - WAY_p_HC_OPTS gives the list of command-line options
579 # The ways currently defined.
581 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
584 # The following ways currently have treated specially, p u t mc mt my mp mg 1s 2d du,
585 # as the driver script treats these guys specially and needs to carefully be told
586 # about the options for these. Hence, we hide the required command line options
587 # for these in the ghc/driver, as this is the only place they are needed.
589 # If you want to add to these default options, fill in the variables below:
595 WAY_t_NAME=ticky-ticky profiling
596 WAY_t_HC_OPTS= -ticky
599 WAY_u_NAME=unregisterized (using portable C only)
602 # Way `mc': concurrent
603 WAY_mc_NAME=concurrent
604 WAY_mc_HC_OPTS=-concurrent
607 WAY_mr_NAME=profiled concurrent
608 WAY_mr_HC_OPTS=-prof -concurrent
611 WAY_mt_NAME=ticky-ticky concurrent
612 WAY_mt_HC_OPTS=-ticky -concurrent
616 WAY_mp_HC_OPTS=-parallel
622 WAY_mg_HC_OPTS=-gransim
625 # Ways for different garbage collectors
627 WAY_2s_NAME=2-space GC
630 WAY_1s_NAME=1-space GC
633 WAY_du_NAME=dual-mode GC
637 # Add user-way configurations here: