[project @ 1997-03-17 20:34:25 by simonpj]
[ghc-hetmet.git] / mk / config.mk.in
1 #
2 # @configure_input@
3 #
4 #################################################################################
5 #
6 #                       config.mk.in-template
7 #
8 #       This file defines all the variables that set the configuration of
9 #       a particular build.
10 #
11 #
12 #################################################################################
13
14 # The configuration is defined in two steps:
15 #
16 #       1. The builder (i.e. the person doing the build)
17 #          copies this file, config.mk.in-template
18 #          to config.mk.in
19 #
20 #       2. S/he then edits it manually (gasp) to reflect any configuration
21 #          options s/he wants.
22 #
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@.
26 #
27 # This is one of only two files that configure generates (the other is config.h)
28 #
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. 
31 #
32
33 # There is a section below for each project within the fptools suite
34 #
35 #       PLUS
36 #
37 # a section corresponding to each of the main .mk files 
38 # included by boilerplate.mk (see boilerplate.mk for a list).
39
40
41
42 #################################################################################
43 #
44 #               project-wide flags
45 #
46 #       Set of options applicable to all fptools projects
47 #
48 #################################################################################
49
50 #
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.
54 #
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.
57 #
58 # Generally:    * glafp-utils should be first
59 #               * literate next
60 #               * happy next
61 #               * ghc&hslibs next
62 #               then it's up to you
63
64 ProjectsToBuild =  glafp-utils literate ghc hslibs
65
66 #
67 # Should the various project tests directories be built?
68 #
69 IncludeTestDirsInBuild=NO
70
71 #################################################################################
72 #
73 #               GHC project
74
75 #       Set of (configurable) options needed by the ghc tree
76 #       plus their default options (if any).
77 #
78 #################################################################################
79
80 #
81 # Name variables for ghc:
82
83 GhcProjectName       =The Glorious Glasgow Haskell Compilation System
84 GhcProjectNameShort  =ghc
85 GhcProjectVersion    =2.02
86 GhcProjectPatchLevel =0
87 GhcBuildeeVersion    =202
88 GhcBuilderVersion    =29
89
90 #
91 # Name variables for the fptools, for now equal to the above
92 # ghc stuff
93 #
94 ProjectName       =$(GhcProjectName)
95 ProjectNameShort  =$(GhcProjectNameShort)
96 ProjectVersion    =$(GhcProjectVersion)
97 ProjectPatchLevel =$(GhcProjectPatchLevel)
98
99
100 #---------------------------------------------------------------
101 #
102 # Variables that control how the compiler itself is built
103
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
110 #                       Valid options:
111 #                            HC_CHALMERS_HBC
112 #                            HC_GLASGOW_GHC
113 #                            HC_ROJEMO_NHC
114 #                            HC_UNSPECIFIED
115 WithGhcHc = ghc-0.29
116 Ghc2_0=NO
117 # Unused, we think
118 # WithGhcHcType=HC_GLASGOW_GHC
119
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)
122 GhcCompilerWays=
123
124 # Extra option flags to pass to the compiler that compiles the compiler
125 # (Ones that are essential are wired into ghc/compiler/Makefile)
126 # Typical ones:
127 #       -O              compiler an optimised compiler
128 #       -DDEBUG         include consistency/assertion checks in the compiled compiler
129 #       -fshow-import-specs     show import specialisations
130 GhcHcOpts=
131
132 # GhcWithHscBuiltViaC - build GHC compiler proper (\`hsc') from .hc files?
133 GhcWithHscBuiltViaC=NO
134
135 # Build hsc with -O and turn optimising flag on when compiling
136 # the intermediate C file
137 GhcUseGccForOptAsm=YES
138
139 # Compile intermediate C file with debugging options set.
140 GhcUseGccForDebuggingAsm=YES
141
142 # Build a registerised version of hsc and runtime
143 # (you'd be desperate or silly not to).
144 GhcWithRegisterised=YES
145
146 # Build a compiler with a native code generator backend
147 # (as well as a C backend)
148 #
149 # Target platforms supported:
150 #   i386, alpha & sparc
151 GhcWithNativeCodeGen=YES
152
153 # Build the compiler with the deforester included?
154 GhcWithDeforester=NO
155
156
157 #---------------------------------------------------------------
158 #
159 # Variables that control how the prelude libararies and runtime system are built
160
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.
164 GhcLibWays=p
165
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 $*)
170
171
172 #################################################################################
173 #
174 #               hslibs project
175 #
176 #       Set of (configurable) options needed by the Haskell libraries (hslibs)
177 #       plus their default options (if any).
178 #
179 #################################################################################
180
181 # Build the Haskell Readline bindings?
182 #
183 HsLibsWithReadline=YES
184 #
185 # Include path to readline.h
186 # (no path == in standard include path)
187 #
188 ReadlineIncludePath=
189
190 # Build the socket libraries?
191 #
192 HsLibsWithSockets=YES
193
194 #
195 # The different ways to build hslibs. Default is just to mirror
196 # what is done for the ghc prelude libraries.
197 #
198 HsLibWays=$(GhcLibWays)
199
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)
203
204 #################################################################################
205 #
206 #               happy project
207 #
208 #       Happy specific options
209 #
210 #################################################################################
211
212
213
214 #################################################################################
215 #
216 #               haggis project
217 #
218 #       Haggis specific options
219 #
220 #################################################################################
221
222
223
224 #################################################################################
225 #
226 #               green-card project
227 #
228 #       Green-card specific options
229 #
230 #################################################################################
231
232
233 #################################################################################
234 #
235 #               nofib project
236 #
237 #       nofib specific options
238 #
239 #################################################################################
240
241
242 # NoFibSubDirs controls which set of tests should be run
243 # You can run one or more of
244 #       imaginary 
245 #       spectral
246 #       real
247 #       parallel
248 #       PRIVATE
249 #       GHC_ONLY
250 #       PENDING
251 #       UNUSED
252 NoFibSubDirs = imaginary spectral real GHC_ONLY PRIVATE
253
254 # The different ways to build nofib. Default is just to mirror
255 # what is done for the ghc prelude libraries.
256 #
257 NoFibWays=$(GhcLibWays)
258
259 # Haskell compiler options for nofib
260 NoFibHcOpts=
261
262 # ==============================================================================
263 #
264 #                       END OF PROJECT-SPECIFIC STUFF
265 #
266 #               Now come the generic configuration options
267 #
268 # ==============================================================================
269
270 #################################################################################
271 #
272 #               Paths (see paths.mk)
273 #
274 #################################################################################
275
276 TMPDIR                  = /tmp
277
278 # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
279
280 FPTOOLS_TOP_ABS         = @hardtop@
281
282 #
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.
286
287 prefix                  = @prefix@
288 exec_prefix             = @exec_prefix@
289 bindir                  = @bindir@
290 sbindir                 = @sbindir@
291 libexecdir              = @libexecdir@
292 datadir                 = @datadir@
293 sysconfdir              = @datadir@
294 sharedstatedir          = @sharedstatedir@
295 localstatedir           = @localstatedir@
296 libdir                  = @libdir@
297 infodir                 = @infodir@
298 includedir              = @includedir@
299 oldincludedir           = @oldincludedir@
300 mandir                  = @mandir@
301 srcdir                  = @srcdir@
302
303 #################################################################################
304 #
305 #               Utilities programs: flags
306 #
307 #################################################################################
308
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
311 #
312 #       SRC_P_OPTS += ...
313 #
314 # where P is the utility. For example, to add -O to all Haskell
315 # compilations, 
316 #
317 #       SRC_HC_OPTS += -O
318
319
320 #################################################################################
321 #
322 #               Platform
323 #
324 #################################################################################
325
326 # A "platform" is the GNU cpu-type/manufacturer/operating-system target machine
327 # specifier.  E.g. sparc-sun-solaris2
328
329 HOSTPLATFORM                    = @HostPlatform@
330 TARGETPLATFORM                  = @TargetPlatform@
331 BUILDPLATFORM                   = @HostPlatform@
332
333 HostPlatform_CPP                = @HostPlatform_CPP@
334 HostArch_CPP                    = @HostArch_CPP@
335 HostOS_CPP                      = @HostOS_CPP@
336 HostVendor_CPP                  = @HostVendor_CPP@
337
338 #
339 # ToDo: check if these can be purged now. -- sof
340 #
341
342 @HostPlatform_CPP@_HOST        = 1
343 @HostPlatform_CPP@_TARGET      = 1
344 @HostPlatform_CPP@_BUILD       = 1
345
346 @HostArch_CPP@_HOST_ARCH       = 1
347 @HostArch_CPP@_TARGET_ARCH      = 1
348 @HostArch_CPP@_BUILD_ARCH      = 1
349
350 @HostOS_CPP@_HOST_OS           = 1
351 @HostOS_CPP@_TARGET_OS         = 1
352 @HostOS_CPP@_BUILD_OS          = 1
353
354 @HostVendor_CPP@_HOST_VENDOR    = 1
355 @HostVendor_CPP@_TARGET_VENDOR  = 1
356 @HostVendor_CPP@_BUILD_VENDOR   = 1
357
358 # Leading underscores on symbol names in object files
359 # Valid options: YES/NO
360 #
361 LeadingUnderscore=@LeadingUnderscore@
362
363 #################################################################################
364 #
365 #               Utilities programs: where to find them
366 #
367 #################################################################################
368
369 #-----------------------------------------------------------------------------
370 # FPtools Utility locations
371
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)
378 #
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
381 # in build.mk:
382 #
383 #   FASTMAKE_PREFIX=
384 #
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).
387 #
388 GLAFP_UTILS             = $(FPTOOLS_TOP)/glafp-utils
389
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/
400
401 # Still used?
402 LITERATE                = $(FPTOOLS_TOP)/literate
403
404 LITERATE_PREFIX         = $(FPTOOLS_TOP)/literate/
405 TEXI2HTML_PREFIX        = $(LITERATE_PREFIX)texi2html/
406
407 HAPPY_PREFIX            = $(FPTOOLS_TOP)/happy/src/
408
409 UNLIT_PREFIX            = $(FPTOOLS_TOP)/ghc/utils/unlit/
410 UGEN_PREFIX             = $(FPTOOLS_TOP)/ghc/utils/ugen/
411 STAT2RESID_PREFIX       = $(FPTOOLS_TOP)/ghc/utils/stat2resid/
412 HP2PS_PREFIX            = $(FPTOOLS_TOP)/ghc/utils/hp2ps/
413 HSCPP_PREFIX            = $(FPTOOLS_TOP)/ghc/utils/hscpp/
414 HSTAGS_PREFIX           = $(FPTOOLS_TOP)/ghc/utils/hstags/
415
416
417 #-----------------------------------------------------------------------------
418 # Haskell compiler and mkdependHS
419
420 HC              = $(FPTOOLS_TOP)/ghc/driver/ghc
421 MKDEPENDHS      = $(HC)
422
423 #
424 # The compiler proper is built with the 1.2 compiler,
425 # so when building the dependencies, we need mkdependHS
426 # for the 1.2 compiler.
427 #
428 MKDEPENDHS_1_2  = mkdependHS-1.2
429
430 #-----------------------------------------------------------------------------
431 # C compiler
432 #
433 #
434 HaveGcc         = @HaveGcc@
435 UseGcc          = YES
436 WhatGccIsCalled = gcc
437 ifeq "$(strip $(HaveGcc))" "YES"
438 ifneq "$(strip $(UseGcc))"  "YES"
439   CC    = cc
440 else
441   CC    = $(WhatGccIsCalled)
442 endif
443 endif
444
445 #-----------------------------------------------------------------------------
446 # Flex
447
448 FLEX                    = @LEX@
449 FLEX_LIB                = @LEXLIB@
450
451 #-----------------------------------------------------------------------------
452 # Other standard (ha!) Unix utilities
453
454 AR                      = @ArCmd@
455 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
456 BASH                    = /usr/local/bin/bash
457 #
458 # Could be either gzip or compress
459 #
460 COMPRESS                = @CompressCmd@
461 COMPRESS_SUFFIX         = @CompressSuffix@
462
463 CONTEXT_DIFF            = @ContextDiffCmd@
464 CP                      = cp
465 CPP                     = @RAWCPP@
466 CTAGS                   = $(ETAGS)
467 RAWCPP                  = @RAWCPP@
468 GNUCPP                  = @GNUCPP@
469 INSTALL                 = @INSTALL@
470 LATEX                   = latex
471 LN_S                    = @LN_S@
472 MANMACROS               = -man
473 MSMACROS                = -ms
474 MV                      = mv
475 NROFF                   = nroff
476 PERL                    = @PerlCmd@
477 PIC                     = pic
478 PREPROCESSCMD           = $(CC) -E
479 PRINTER                 = lpr
480 RANLIB                  = @RANLIB@
481 RM                      = rm -f
482 SED                     = @SedCmd@
483 SHELL                   = /bin/sh
484 SIZE                    = size
485 STRIP                   = strip
486 TAR                     = @TarCmd@
487 #
488 # This is special to literate/, ToDo: add literate-specific
489 # configure setup to literate/.
490 #
491 TBL                     = tbl
492 TEX                     = tex
493 TGRIND                  = tgrind
494 TGRIND_HELPER           = /usr/local/lib/tgrind/tfontedpr # XXX
495 TIB                     = tib
496
497 TIME                    = @TimeCmd@
498 TROFF                   = troff
499 UNAME                   = uname
500 YACC                    = @YaccCmd@
501
502
503 #-----------------------------------------------------------------------------
504 #               FPtools support software
505
506 # Stuff from fptools/glafp-utils
507 MKDEPENDC               = $(MKDEPENDC_PREFIX)mkdependC
508 FASTMAKE                = $(FASTMAKE_PREFIX)fastmake
509 LTX                     = $(LTX_PREFIX)ltx
510 MKDIRHIER               = $(MKDIRHIER_PREFIX)mkdirhier
511 LNDIR                   = $(LNDIR_PREFIX)lndir
512 MSUB                    = $(MSUB_PREFIX)msub
513 ETAGS                   = $(ETAGS_PREFIX)etags
514 VERBATIM                = $(VERBATIM_PREFIX)verbatim
515 RUNTEST                 = $(RUNTEST_PREFIX)runstdtest
516 HAPPY                   = @HappyCmd@
517 LX                      = @LxCmd@
518
519 ifneq "$(HAPPY)" ""
520 HAPPY                   = $(HAPPY_PREFIX)happy
521 endif
522
523 #
524 # Stuff from fptools/literate
525 #
526 INFO                    = $(UTIL_PREFIX)info
527 MAKEINFO                = $(INFO_PREFIX)makeinfo
528 POSTMAKEINFO            = $(INFO_PREFIX)postmakeinfo
529 LIT2PGM                 = $(LITERATE_PREFIX)lit2pgm
530 LIT2TEXI                = $(LITERATE_PREFIX)lit2texi
531 LIT2HTML                = $(LITERATE_PREFIX)lit2html
532 LIT2LATEX               = $(LITERATE_PREFIX)lit2latex
533 MKDEPENDLIT             = $(LITERATE_PREFIX)mkdependlit
534 LIT2CHANGELOG           = $(LITERATE_PREFIX)lit2changelog
535 LIT2TEXT                = $(LITERATE_PREFIX)lit2text
536 TEXI2HTML               = $(TEXI2HTML_PREFIX)texi2html
537
538 #
539 # Stuff from fptools/ghc/utils
540 #
541 UNLIT                   = $(UNLIT_PREFIX)unlit
542 UGEN                    = $(UGEN_PREFIX)ugen
543 STAT2RESID              = $(STAT2RESID_PREFIX)stat2resid
544 HP2PS                   = $(HP2PS_PREFIX)hp2ps
545 HSCPP                   = $(HSCPP_PREFIX)hscpp
546 HSTAGS                  = $(HSTAGS_PREFIX)hstags
547
548 #
549 # Options for the compiling different `ways'. Various projects within
550 # the glorious fptools tree support building in various user-configured
551 # ways. For instance, you could set up one `way' such that the prelude
552 # libraries and hslibs all were built with the option -ffoldr-build-on.
553
554 # To configure up your own way, have a look at some of the standard ways
555 # such as profiling, and create your own set of WAY_*_OPTS defs below.
556 # After having done that, add your way string to WAYS, and after having
557 # run the configure script, the different projects will add the new way
558 # to the list of ways they support.
559 #
560
561 #
562 # IMPORTANT! The WAYS variable configures the different `ways'
563 # you want to build a project (or maybe just parts of it, as is
564 # the case for ghc/). This variable is intended set inside the
565 # project mk setup, enforcing a global fptools WAYS is a bit too
566 # much (do you *really* want to build glafp-utils the profiled-concurrent 
567 # way?)
568 #
569
570 #
571 # Definitions of the different ways:
572 #   
573 #   * their name:
574 #          - tag, e.g., p
575 #          - description, e.g., profiling
576 #   * what they mean to the driver:
577 #          - WAY_p_HC_OPTS gives the list of command-line options
578 #            to the driver.
579 #
580
581 #
582 # The ways currently defined.
583 #
584 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
585
586 #
587 # The following ways currently have treated specially, p u t mc mt my mp mg 1s 2d du,
588 # as the driver script treats these guys specially and needs to carefully be told
589 # about the options for these. Hence, we hide the required command line options
590 # for these in the ghc/driver, as this is the only place they are needed.
591
592 # If you want to add to these default options, fill in the variables below:
593
594 WAY_p_NAME=profiling
595 WAY_p_HC_OPTS= -prof
596
597 # Way t:
598 WAY_t_NAME=ticky-ticky profiling
599 WAY_t_HC_OPTS= -ticky
600
601 # Way `u':
602 WAY_u_NAME=unregisterized (using portable C only)
603 WAY_u_HC_OPTS=
604
605 # Way `mc': concurrent
606 WAY_mc_NAME=concurrent
607 WAY_mc_HC_OPTS=-concurrent
608
609 # Way `mr': 
610 WAY_mr_NAME=profiled concurrent
611 WAY_mr_HC_OPTS=-prof -concurrent
612
613 # Way `mt': 
614 WAY_mt_NAME=ticky-ticky concurrent
615 WAY_mt_HC_OPTS=-ticky -concurrent
616
617 # Way `mp': 
618 WAY_mp_NAME=parallel
619 WAY_mp_HC_OPTS=-parallel
620
621 #
622 # Way `mg': 
623 #
624 WAY_mg_NAME=GranSim
625 WAY_mg_HC_OPTS=-gransim
626
627 #
628 # Ways for different garbage collectors
629 #
630 WAY_2s_NAME=2-space GC
631 WAY_2s_HC_OPTS=-2s
632
633 WAY_1s_NAME=1-space GC
634 WAY_1s_HC_OPTS=-1s
635
636 WAY_du_NAME=dual-mode GC
637 WAY_du_HC_OPTS=-du
638
639 #
640 # Add user-way configurations here:
641 #
642 WAY_A_NAME=
643 WAY_A_HC_OPTS=
644
645 WAY_B_NAME=
646 WAY_B_HC_OPTS=
647
648 WAY_a_NAME=
649 WAY_a_HC_OPTS=
650
651 WAY_b_NAME=
652 WAY_b_HC_OPTS=
653
654 WAY_c_NAME=
655 WAY_c_HC_OPTS=
656
657 WAY_d_NAME=
658 WAY_d_HC_OPTS=
659
660 WAY_e_NAME=
661 WAY_e_HC_OPTS=
662
663 WAY_f_NAME=
664 WAY_f_HC_OPTS=
665
666 WAY_g_NAME=
667 WAY_g_HC_OPTS=
668
669 WAY_h_NAME=
670 WAY_h_HC_OPTS=
671
672 WAY_i_NAME=
673 WAY_i_HC_OPTS=
674
675 WAY_j_NAME=
676 WAY_j_HC_OPTS=
677
678 WAY_k_NAME=
679 WAY_k_HC_OPTS=
680
681 WAY_l_NAME=
682 WAY_l_HC_OPTS=
683
684 WAY_m_NAME=
685 WAY_m_HC_OPTS=
686
687 WAY_n_NAME=
688 WAY_n_HC_OPTS=
689
690 WAY_o_NAME=
691 WAY_o_HC_OPTS=