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