Turn off lax dependencies by default
[ghc.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 # An unregisterised, optimised build of ghc, for porting:
31 #BuildFlavour = unreg
32
33 GhcLibWays = v
34
35 # -------- 1. A Performance/Distribution build--------------------------------
36
37 ifeq "$(BuildFlavour)" "perf"
38
39 # perf matches the default settings, repeated here for comparison:
40
41 SRC_HC_OPTS     = -O -H64m
42 GhcStage1HcOpts = -O -fasm
43 GhcStage2HcOpts = -O2 -fasm
44 GhcHcOpts       = -Rghc-timing
45 GhcLibHcOpts    = -O2
46 GhcLibWays     += p
47
48 ifeq "$(PlatformSupportsSharedLibs)" "YES"
49 GhcLibWays += dyn
50 endif
51
52 endif
53
54 # -------- A Fast build ------------------------------------------------------
55
56 ifeq "$(BuildFlavour)" "quickest"
57
58 SRC_HC_OPTS        = -H64m -O0 -fasm
59 GhcStage1HcOpts    = -O -fasm
60 GhcStage2HcOpts    = -O0 -fasm
61 GhcLibHcOpts       = -O0 -fasm
62 SplitObjs          = NO
63 HADDOCK_DOCS       = NO
64 BUILD_DOCBOOK_HTML = NO
65 BUILD_DOCBOOK_PS   = NO
66 BUILD_DOCBOOK_PDF  = NO
67
68 endif
69
70 # -------- A Fast build with optimised libs ----------------------------------
71
72 ifeq "$(BuildFlavour)" "quick"
73
74 SRC_HC_OPTS        = -H64m -O0 -fasm
75 GhcStage1HcOpts    = -O -fasm
76 GhcStage2HcOpts    = -O0 -fasm
77 GhcLibHcOpts       = -O -fasm
78 SplitObjs          = NO
79 HADDOCK_DOCS       = NO
80 BUILD_DOCBOOK_HTML = NO
81 BUILD_DOCBOOK_PS   = NO
82 BUILD_DOCBOOK_PDF  = NO
83
84 endif
85
86 # -------- Profile the stage2 compiler ---------------------------------------
87
88 ifeq "$(BuildFlavour)" "prof"
89
90 SRC_HC_OPTS        = -H64m -O0 -fasm
91 GhcStage1HcOpts    = -O -fasm
92 GhcStage2HcOpts    = -O -fasm
93 GhcLibHcOpts       = -O -fasm
94
95 GhcLibWays         += p
96 GhcProfiled        = YES
97
98 SplitObjs          = NO
99 HADDOCK_DOCS       = NO
100 BUILD_DOCBOOK_HTML = NO
101 BUILD_DOCBOOK_PS   = NO
102 BUILD_DOCBOOK_PDF  = NO
103
104 endif
105
106
107 # -------- A Development build (stage 1) -------------------------------------
108
109 ifeq "$(BuildFlavour)" "devel1"
110
111 SRC_HC_OPTS        = -H64m -O -fasm
112 GhcLibHcOpts       = -O -dcore-lint
113 GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
114 GhcStage2HcOpts    = -Rghc-timing -O -fasm
115 SplitObjs          = NO
116 HADDOCK_DOCS       = NO
117 BUILD_DOCBOOK_HTML = NO
118 BUILD_DOCBOOK_PS   = NO
119 BUILD_DOCBOOK_PDF  = NO
120 LAX_DEPENDENCIES   = YES
121
122 endif
123
124 # -------- A Development build (stage 2) -------------------------------------
125
126 ifeq "$(BuildFlavour)" "devel2"
127
128 SRC_HC_OPTS        = -H64m -O -fasm
129 GhcLibHcOpts       = -O -dcore-lint
130 GhcStage1HcOpts    = -Rghc-timing -O -fasm
131 GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
132 SplitObjs          = NO
133 HADDOCK_DOCS       = NO
134 BUILD_DOCBOOK_HTML = NO
135 BUILD_DOCBOOK_PS   = NO
136 BUILD_DOCBOOK_PDF  = NO
137 LAX_DEPENDENCIES   = YES
138
139 # After stage 1 and the libraries have been built, you can uncomment this line:
140
141 # stage=2
142
143 # Then stage 1 will not be touched by the build system, until
144 # you comment the line again.  This is a useful trick for when you're
145 # working on stage 2 and want to freeze stage 1 and the libraries for
146 # a while.
147
148 endif
149
150 # -------- A Unregisterised build) -------------------------------------------
151
152 ifeq "$(BuildFlavour)" "unreg"
153
154 GhcUnregisterised    = YES
155 GhcWithNativeCodeGen = NO
156
157 SRC_HC_OPTS          = -O -H64m
158 GhcStage1HcOpts      = -O
159 GhcStage2HcOpts      = -O2
160 GhcHcOpts            = -Rghc-timing
161 GhcLibHcOpts         = -O2
162 SplitObjs            = NO
163 HADDOCK_DOCS         = NO
164 BUILD_DOCBOOK_HTML   = NO
165 BUILD_DOCBOOK_PS     = NO
166 BUILD_DOCBOOK_PDF    = NO
167
168 endif
169
170 # -----------------------------------------------------------------------------
171 # Other settings that might be useful
172
173 # NoFib settings
174 NoFibWays =
175 STRIP_CMD = :