[project @ 1997-03-25 21:17:10 by sof]
[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=NO
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 INFO_PREFIX             = $(FPTOOLS_TOP)/literate/info-utils/
406 TEXI2HTML_PREFIX        = $(LITERATE_PREFIX)texi2html/
407
408 HAPPY_PREFIX            = $(FPTOOLS_TOP)/happy/src/
409
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/
416
417
418 #-----------------------------------------------------------------------------
419 # Haskell compiler and mkdependHS
420
421 HC              = $(FPTOOLS_TOP)/ghc/driver/ghc
422 MKDEPENDHS      = $(HC)
423
424 #
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.
428 #
429 MKDEPENDHS_1_2  = mkdependHS-1.2
430
431 #-----------------------------------------------------------------------------
432 # C compiler
433 #
434 #
435 HaveGcc         = @HaveGcc@
436 UseGcc          = YES
437 WhatGccIsCalled = gcc
438 ifeq "$(strip $(HaveGcc))" "YES"
439 ifneq "$(strip $(UseGcc))"  "YES"
440   CC    = cc
441 else
442   CC    = $(WhatGccIsCalled)
443 endif
444 endif
445
446 #-----------------------------------------------------------------------------
447 # Flex
448
449 FLEX                    = @LEX@
450 FLEX_LIB                = @LEXLIB@
451
452 #-----------------------------------------------------------------------------
453 # Other standard (ha!) Unix utilities
454
455 AR                      = @ArCmd@
456 # Yuckage: for ghc/utils/parallel -- todo: nuke this dependency!!
457 BASH                    = /usr/local/bin/bash
458 #
459 # Could be either gzip or compress
460 #
461 COMPRESS                = @CompressCmd@
462 COMPRESS_SUFFIX         = @CompressSuffix@
463
464 CONTEXT_DIFF            = @ContextDiffCmd@
465 CP                      = cp
466 CPP                     = @RAWCPP@
467 CTAGS                   = $(ETAGS)
468 RAWCPP                  = @RAWCPP@
469 GNUCPP                  = @GNUCPP@
470 INSTALL                 = @INSTALL@
471 #
472 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
473 # install-sh script (if chosen). This not terribly useful to us, so we convert
474 # it into an abs. path.
475
476 ifeq "$(INSTALL)" ".././install-sh"
477 INSTALL                 = $(FPTOOLS_TOP_ABS)/install-sh
478 endif
479 LATEX                   = latex
480 LN_S                    = @LN_S@
481 MANMACROS               = -man
482 MSMACROS                = -ms
483 MV                      = mv
484 NROFF                   = nroff
485 PERL                    = @PerlCmd@
486 PIC                     = pic
487 PREPROCESSCMD           = $(CC) -E
488 PRINTER                 = lpr
489 RANLIB                  = @RANLIB@
490 RM                      = rm -f
491 SED                     = @SedCmd@
492 SHELL                   = /bin/sh
493 SIZE                    = size
494 STRIP                   = strip
495 TAR                     = @TarCmd@
496 #
497 # This is special to literate/, ToDo: add literate-specific
498 # configure setup to literate/.
499 #
500 TBL                     = tbl
501 TEX                     = tex
502 TGRIND                  = tgrind
503 TGRIND_HELPER           = /usr/local/lib/tgrind/tfontedpr # XXX
504 TIB                     = tib
505
506 TIME                    = @TimeCmd@
507 TROFF                   = troff
508 UNAME                   = uname
509 YACC                    = @YaccCmd@
510
511
512 #-----------------------------------------------------------------------------
513 #               FPtools support software
514
515 # Stuff from fptools/glafp-utils
516 MKDEPENDC               = $(MKDEPENDC_PREFIX)mkdependC
517 FASTMAKE                = $(FASTMAKE_PREFIX)fastmake
518 LTX                     = $(LTX_PREFIX)ltx
519 MKDIRHIER               = $(MKDIRHIER_PREFIX)mkdirhier
520 LNDIR                   = $(LNDIR_PREFIX)lndir
521 MSUB                    = $(MSUB_PREFIX)msub
522 ETAGS                   = $(ETAGS_PREFIX)etags
523 VERBATIM                = $(VERBATIM_PREFIX)verbatim
524 RUNTEST                 = $(RUNTEST_PREFIX)runstdtest
525 HAPPY                   = @HappyCmd@
526 LX                      = @LxCmd@
527
528 ifeq "$(HAPPY)" ""
529 HAPPY                   = $(HAPPY_PREFIX)happy
530 endif
531
532 #
533 # Stuff from fptools/literate
534 #
535 INFO                    = $(UTIL_PREFIX)info
536 MAKEINFO                = $(INFO_PREFIX)makeinfo
537 POSTMAKEINFO            = $(INFO_PREFIX)postmakeinfo
538 LIT2PGM                 = $(LITERATE_PREFIX)lit2pgm
539 LIT2TEXI                = $(LITERATE_PREFIX)lit2texi
540 LIT2HTML                = $(LITERATE_PREFIX)lit2html
541 LIT2LATEX               = $(LITERATE_PREFIX)lit2latex
542 MKDEPENDLIT             = $(LITERATE_PREFIX)mkdependlit
543 LIT2CHANGELOG           = $(LITERATE_PREFIX)lit2changelog
544 LIT2TEXT                = $(LITERATE_PREFIX)lit2text
545 TEXI2HTML               = $(TEXI2HTML_PREFIX)texi2html
546
547 #
548 # Stuff from fptools/ghc/utils
549 #
550 UNLIT                   = $(UNLIT_PREFIX)unlit
551 UGEN                    = $(UGEN_PREFIX)ugen
552 STAT2RESID              = $(STAT2RESID_PREFIX)stat2resid
553 HP2PS                   = $(HP2PS_PREFIX)hp2ps
554 HSCPP                   = $(HSCPP_PREFIX)hscpp
555 HSTAGS                  = $(HSTAGS_PREFIX)hstags
556
557 #
558 # Options for the compiling different `ways'. Various projects within
559 # the glorious fptools tree support building in various user-configured
560 # ways. For instance, you could set up one `way' such that the prelude
561 # libraries and hslibs all were built with the option -ffoldr-build-on.
562
563 # To configure up your own way, have a look at some of the standard ways
564 # such as profiling, and create your own set of WAY_*_OPTS defs below.
565 # After having done that, add your way string to WAYS, and after having
566 # run the configure script, the different projects will add the new way
567 # to the list of ways they support.
568 #
569
570 #
571 # IMPORTANT! The WAYS variable configures the different `ways'
572 # you want to build a project (or maybe just parts of it, as is
573 # the case for ghc/). This variable is intended set inside the
574 # project mk setup, enforcing a global fptools WAYS is a bit too
575 # much (do you *really* want to build glafp-utils the profiled-concurrent 
576 # way?)
577 #
578
579 #
580 # Definitions of the different ways:
581 #   
582 #   * their name:
583 #          - tag, e.g., p
584 #          - description, e.g., profiling
585 #   * what they mean to the driver:
586 #          - WAY_p_HC_OPTS gives the list of command-line options
587 #            to the driver.
588 #
589
590 #
591 # The ways currently defined.
592 #
593 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
594
595 #
596 # The following ways currently have treated specially, p u t mc mt my mp mg 1s 2d du,
597 # as the driver script treats these guys specially and needs to carefully be told
598 # about the options for these. Hence, we hide the required command line options
599 # for these in the ghc/driver, as this is the only place they are needed.
600
601 # If you want to add to these default options, fill in the variables below:
602
603 WAY_p_NAME=profiling
604 WAY_p_HC_OPTS= -prof
605
606 # Way t:
607 WAY_t_NAME=ticky-ticky profiling
608 WAY_t_HC_OPTS= -ticky
609
610 # Way `u':
611 WAY_u_NAME=unregisterized (using portable C only)
612 WAY_u_HC_OPTS=
613
614 # Way `mc': concurrent
615 WAY_mc_NAME=concurrent
616 WAY_mc_HC_OPTS=-concurrent
617
618 # Way `mr': 
619 WAY_mr_NAME=profiled concurrent
620 WAY_mr_HC_OPTS=-prof -concurrent
621
622 # Way `mt': 
623 WAY_mt_NAME=ticky-ticky concurrent
624 WAY_mt_HC_OPTS=-ticky -concurrent
625
626 # Way `mp': 
627 WAY_mp_NAME=parallel
628 WAY_mp_HC_OPTS=-parallel
629
630 #
631 # Way `mg': 
632 #
633 WAY_mg_NAME=GranSim
634 WAY_mg_HC_OPTS=-gransim
635
636 #
637 # Ways for different garbage collectors
638 #
639 WAY_2s_NAME=2-space GC
640 WAY_2s_HC_OPTS=-2s
641
642 WAY_1s_NAME=1-space GC
643 WAY_1s_HC_OPTS=-1s
644
645 WAY_du_NAME=dual-mode GC
646 WAY_du_HC_OPTS=-du
647
648 #
649 # Add user-way configurations here:
650 #
651 WAY_A_NAME=
652 WAY_A_HC_OPTS=
653
654 WAY_B_NAME=
655 WAY_B_HC_OPTS=
656
657 WAY_a_NAME=
658 WAY_a_HC_OPTS=
659
660 WAY_b_NAME=
661 WAY_b_HC_OPTS=
662
663 WAY_c_NAME=
664 WAY_c_HC_OPTS=
665
666 WAY_d_NAME=
667 WAY_d_HC_OPTS=
668
669 WAY_e_NAME=
670 WAY_e_HC_OPTS=
671
672 WAY_f_NAME=
673 WAY_f_HC_OPTS=
674
675 WAY_g_NAME=
676 WAY_g_HC_OPTS=
677
678 WAY_h_NAME=
679 WAY_h_HC_OPTS=
680
681 WAY_i_NAME=
682 WAY_i_HC_OPTS=
683
684 WAY_j_NAME=
685 WAY_j_HC_OPTS=
686
687 WAY_k_NAME=
688 WAY_k_HC_OPTS=
689
690 WAY_l_NAME=
691 WAY_l_HC_OPTS=
692
693 WAY_m_NAME=
694 WAY_m_HC_OPTS=
695
696 WAY_n_NAME=
697 WAY_n_HC_OPTS=
698
699 WAY_o_NAME=
700 WAY_o_HC_OPTS=