GHC new build system megapatch
[ghc-hetmet.git] / mk / build.mk.sample
1 # -----------------------------------------------------------------------------
2 # A Sample build.mk
3 #
4 # Uncomment one of the following BuildFlavour settings to get the desired
5 # overall build type, and then tweak the options in the relevant section
6 # below.
7
8 # Uncomment one of these to select a build profile below:
9
10 # Full build with max optimisation (slow build)
11 #BuildFlavour = perf
12
13 # Fastest build (libs unoptimised):
14 #BuildFlavour = quickest
15
16 # Fast build with optimised libraries:
17 #BuildFlavour = quick
18
19 # A development build, working on the stage 1 compiler:
20 #BuildFlavour = devel1
21
22 # A development build, working on the stage 2 compiler:
23 #BuildFlavour = devel2
24
25 # Which warnings we like to use
26 MyWarningOpts   = -W -fno-warn-unused-matches -fwarn-unused-imports
27
28 GhcLibWays = v
29
30 # -------- 1. A Performance/Distribution build--------------------------------
31
32 ifeq "$(BuildFlavour)" "perf"
33
34 # perf matches the default settings, repeated here for comparison:
35
36 SRC_HC_OPTS     = -O -H64m
37 GhcStage1HcOpts = -O -fasm
38 GhcStage2HcOpts = -O2 -fasm
39 GhcHcOpts       = -Rghc-timing
40 GhcLibHcOpts    = -O2 -XGenerics
41 GhcLibWays     += p
42
43 endif
44
45 # -------- A Fast build ------------------------------------------------------
46
47 ifeq "$(BuildFlavour)" "quickest"
48
49 SRC_HC_OPTS     = -H64m -O0 -fasm
50 GhcStage1HcOpts = -O -fasm
51 GhcStage2HcOpts = -O0 -fasm
52 GhcLibHcOpts    = -O0 -fasm
53 SplitObjs       = NO
54
55 endif
56
57 # -------- A Fast build with optimised libs ----------------------------------
58
59 ifeq "$(BuildFlavour)" "quick"
60
61 SRC_HC_OPTS     = -H64m -O0 -fasm
62 GhcStage1HcOpts = -O -fasm
63 GhcStage2HcOpts = -O0 -fasm
64 GhcLibHcOpts    = -O -fasm
65 SplitObjs       = NO
66
67 endif
68
69 # -------- A Development build (stage 1) -------------------------------------
70
71 ifeq "$(BuildFlavour)" "devel1"
72
73 SRC_HC_OPTS     = -H64m -O -fasm $(MyWarningOpts)
74 GhcLibHcOpts    = -O -dcore-lint $(MyWarningOpts)
75 GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
76 GhcStage2HcOpts = -Rghc-timing -O -fasm
77 SplitObjs = NO
78
79 endif
80
81 # -------- A Development build (stage 2) -------------------------------------
82
83 ifeq "$(BuildFlavour)" "devel2"
84
85 SRC_HC_OPTS     = -H64m -O -fasm $(MyWarningOpts)
86 GhcLibHcOpts    = -O -dcore-lint $(MyWarningOpts)
87 GhcStage1HcOpts = -Rghc-timing -O -fasm
88 GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
89 SplitObjs = NO
90
91 endif
92
93 # -----------------------------------------------------------------------------
94 # Other settings that might be useful
95
96 # profiled RTS
97 #GhcRtsCcOpts =  -pg -g
98
99 # Optimised/profiled RTS
100 #GhcRtsCcOpts = -O2 -pg
101
102 #GhcRtsWithFrontPanel = YES
103 #SRC_HC_OPTS += `gtk-config --libs`
104
105 # NoFib settings
106 NoFibWays =
107 STRIP=: