update submodules for GHC.HetMet.GArrow -> Control.GArrow renaming
[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 and everything enabled (very slow build)
11 #BuildFlavour = perf
12
13 # Fast build with optimised libraries, no profiling (RECOMMENDED):
14 #BuildFlavour = quick
15
16 # Even faster build.  NOT RECOMMENDED: the libraries will be
17 # completely unoptimised, so any code built with this compiler
18 # (including stage2) will run very slowly:
19 #BuildFlavour = quickest
20
21 # Profile the stage2 compiler:
22 #BuildFlavour = prof
23
24 # A development build, working on the stage 1 compiler:
25 #BuildFlavour = devel1
26
27 # A development build, working on the stage 2 compiler:
28 #BuildFlavour = devel2
29
30 GhcLibWays = v
31
32 # -------- 1. A Performance/Distribution build--------------------------------
33
34 ifeq "$(BuildFlavour)" "perf"
35
36 # perf matches the default settings, repeated here for comparison:
37
38 SRC_HC_OPTS     = -O -H64m
39 GhcStage1HcOpts = -O -fasm
40 GhcStage2HcOpts = -O2 -fasm
41 GhcHcOpts       = -Rghc-timing
42 GhcLibHcOpts    = -O2
43 GhcLibWays     += p
44
45 ifeq "$(PlatformSupportsSharedLibs)" "YES"
46 GhcLibWays += dyn
47 endif
48
49 endif
50
51 # -------- A Fast build ------------------------------------------------------
52
53 ifeq "$(BuildFlavour)" "quickest"
54
55 SRC_HC_OPTS        = -H64m -O0 -fasm
56 GhcStage1HcOpts    = -O -fasm
57 GhcStage2HcOpts    = -O0 -fasm
58 GhcLibHcOpts       = -O0 -fasm
59 SplitObjs          = NO
60 HADDOCK_DOCS       = NO
61 BUILD_DOCBOOK_HTML = NO
62 BUILD_DOCBOOK_PS   = NO
63 BUILD_DOCBOOK_PDF  = NO
64
65 endif
66
67 # -------- A Fast build with optimised libs ----------------------------------
68
69 ifeq "$(BuildFlavour)" "quick"
70
71 SRC_HC_OPTS        = -H64m -O0 -fasm
72 GhcStage1HcOpts    = -O -fasm
73 GhcStage2HcOpts    = -O0 -fasm
74 GhcLibHcOpts       = -O -fasm
75 SplitObjs          = NO
76 HADDOCK_DOCS       = NO
77 BUILD_DOCBOOK_HTML = NO
78 BUILD_DOCBOOK_PS   = NO
79 BUILD_DOCBOOK_PDF  = NO
80
81 endif
82
83 # -------- Profile the stage2 compiler ---------------------------------------
84
85 ifeq "$(BuildFlavour)" "prof"
86
87 SRC_HC_OPTS        = -H64m -O0 -fasm
88 GhcStage1HcOpts    = -O -fasm
89 GhcStage2HcOpts    = -O -fasm
90 GhcLibHcOpts       = -O -fasm
91
92 GhcLibWays         += p
93 GhcProfiled        = YES
94
95 SplitObjs          = NO
96 HADDOCK_DOCS       = NO
97 BUILD_DOCBOOK_HTML = NO
98 BUILD_DOCBOOK_PS   = NO
99 BUILD_DOCBOOK_PDF  = NO
100
101 endif
102
103
104 # -------- A Development build (stage 1) -------------------------------------
105
106 ifeq "$(BuildFlavour)" "devel1"
107
108 SRC_HC_OPTS        = -H64m -O -fasm
109 GhcLibHcOpts       = -O -dcore-lint
110 GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
111 GhcStage2HcOpts    = -Rghc-timing -O -fasm
112 SplitObjs          = NO
113 HADDOCK_DOCS       = NO
114 BUILD_DOCBOOK_HTML = NO
115 BUILD_DOCBOOK_PS   = NO
116 BUILD_DOCBOOK_PDF  = NO
117
118 endif
119
120 # -------- A Development build (stage 2) -------------------------------------
121
122 ifeq "$(BuildFlavour)" "devel2"
123
124 SRC_HC_OPTS        = -H64m -O -fasm
125 GhcLibHcOpts       = -O -dcore-lint
126 GhcStage1HcOpts    = -Rghc-timing -O -fasm
127 GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
128 SplitObjs          = NO
129 HADDOCK_DOCS       = NO
130 BUILD_DOCBOOK_HTML = NO
131 BUILD_DOCBOOK_PS   = NO
132 BUILD_DOCBOOK_PDF  = NO
133
134 endif
135
136 # -----------------------------------------------------------------------------
137 # Other settings that might be useful
138
139 # NoFib settings
140 NoFibWays =
141 STRIP_CMD = :