Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 176 lines (127 sloc) 4.351 kb
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
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
3321ef4 [project @ 2005-04-19 12:29:56 by simonmar]
simonmar authored
8 # Uncomment one of these to select a build profile below:
9
8a23f2d @simonmar comments
simonmar authored
10 # Full build with max optimisation and everything enabled (very slow build)
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
11 #BuildFlavour = perf
12
8a23f2d @simonmar comments
simonmar authored
13 # Fast build with optimised libraries, no profiling (RECOMMENDED):
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
14 #BuildFlavour = quick
15
8a23f2d @simonmar comments
simonmar authored
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
76c520c @simonmar make GhcProfiled work, and add a "prof" flavour to build.mk
simonmar authored
21 # Profile the stage2 compiler:
22 #BuildFlavour = prof
23
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
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
8cef78c Add an unregisterised config to build.mk
David Terei authored
30 # An unregisterised, optimised build of ghc, for porting:
31 #BuildFlavour = unreg
32
34cc75e @igfoo GHC new build system megapatch
igfoo authored
33 GhcLibWays = v
34
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
35 # -------- 1. A Performance/Distribution build--------------------------------
36
37 ifeq "$(BuildFlavour)" "perf"
38
f7963d3 @simonmar update the "perf" settings to match the default
simonmar authored
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
54ca48a @dreixel Do not enable -XGenerics when building the optimized libs.
dreixel authored
45 GhcLibHcOpts = -O2
34cc75e @igfoo GHC new build system megapatch
igfoo authored
46 GhcLibWays += p
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
47
d6d0a19 @simonmar Fix up logic to decide whether shared libs are being built or not
simonmar authored
48 ifeq "$(PlatformSupportsSharedLibs)" "YES"
49 GhcLibWays += dyn
50 endif
51
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
52 endif
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
53
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
54 # -------- A Fast build ------------------------------------------------------
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
55
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
56 ifeq "$(BuildFlavour)" "quickest"
57
77fa0c7 @simonmar disable all docs in the "quick" and "devel" builds
simonmar authored
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
dbeedb1 some updates
Simon Marlow authored
67
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
68 endif
dbeedb1 some updates
Simon Marlow authored
69
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
70 # -------- A Fast build with optimised libs ----------------------------------
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
71
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
72 ifeq "$(BuildFlavour)" "quick"
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
73
77fa0c7 @simonmar disable all docs in the "quick" and "devel" builds
simonmar authored
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
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
83
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
84 endif
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
85
76c520c @simonmar make GhcProfiled work, and add a "prof" flavour to build.mk
simonmar authored
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
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
107 # -------- A Development build (stage 1) -------------------------------------
108
109 ifeq "$(BuildFlavour)" "devel1"
110
cc00752 @simonmar remove warning settings; we already have warnings turned on everywhere
simonmar authored
111 SRC_HC_OPTS = -H64m -O -fasm
112 GhcLibHcOpts = -O -dcore-lint
77fa0c7 @simonmar disable all docs in the "quick" and "devel" builds
simonmar authored
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
96adae6 @igfoo Turn off lax dependencies by default
igfoo authored
120 LAX_DEPENDENCIES = YES
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
121
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
122 endif
123
124 # -------- A Development build (stage 2) -------------------------------------
125
126 ifeq "$(BuildFlavour)" "devel2"
127
cc00752 @simonmar remove warning settings; we already have warnings turned on everywhere
simonmar authored
128 SRC_HC_OPTS = -H64m -O -fasm
129 GhcLibHcOpts = -O -dcore-lint
77fa0c7 @simonmar disable all docs in the "quick" and "devel" builds
simonmar authored
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
96adae6 @igfoo Turn off lax dependencies by default
igfoo authored
137 LAX_DEPENDENCIES = YES
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
138
8feb281 @simonmar comment about using "stage = 2" in build.mk
simonmar authored
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
6b5bbe0 @simonmar comment wibble
simonmar authored
144 # you comment the line again. This is a useful trick for when you're
8feb281 @simonmar comment about using "stage = 2" in build.mk
simonmar authored
145 # working on stage 2 and want to freeze stage 1 and the libraries for
146 # a while.
147
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
148 endif
149
8cef78c Add an unregisterised config to build.mk
David Terei authored
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
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
170 # -----------------------------------------------------------------------------
171 # Other settings that might be useful
1dc6b07 [project @ 2002-04-02 10:34:56 by simonmar]
simonmar authored
172
7d8b8c2 update, and add some more build flavours (inc. dons's fast build)
Simon Marlow authored
173 # NoFib settings
174 NoFibWays =
0481fe0 @igfoo Rename some variables from FOO to FOO_CMD
igfoo authored
175 STRIP_CMD = :
Something went wrong with that request. Please try again.