1 # -----------------------------------------------------------------------------
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
8 # Uncomment one of these to select a build profile below:
10 # Full build with max optimisation and everything enabled (very slow build)
13 # Fast build with optimised libraries, no profiling (RECOMMENDED):
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
21 # Profile the stage2 compiler:
24 # A development build, working on the stage 1 compiler:
25 #BuildFlavour = devel1
27 # A development build, working on the stage 2 compiler:
28 #BuildFlavour = devel2
32 # -------- 1. A Performance/Distribution build--------------------------------
34 ifeq "$(BuildFlavour)" "perf"
36 # perf matches the default settings, repeated here for comparison:
38 SRC_HC_OPTS = -O -H64m
39 GhcStage1HcOpts = -O -fasm
40 GhcStage2HcOpts = -O2 -fasm
41 GhcHcOpts = -Rghc-timing
42 GhcLibHcOpts = -O2 -XGenerics
45 ifeq "$(PlatformSupportsSharedLibs)" "YES"
51 # -------- A Fast build ------------------------------------------------------
53 ifeq "$(BuildFlavour)" "quickest"
55 SRC_HC_OPTS = -H64m -O0 -fasm
56 GhcStage1HcOpts = -O -fasm
57 GhcStage2HcOpts = -O0 -fasm
58 GhcLibHcOpts = -O0 -fasm
61 BUILD_DOCBOOK_HTML = NO
63 BUILD_DOCBOOK_PDF = NO
67 # -------- A Fast build with optimised libs ----------------------------------
69 ifeq "$(BuildFlavour)" "quick"
71 SRC_HC_OPTS = -H64m -O0 -fasm
72 GhcStage1HcOpts = -O -fasm
73 GhcStage2HcOpts = -O0 -fasm
74 GhcLibHcOpts = -O -fasm
77 BUILD_DOCBOOK_HTML = NO
79 BUILD_DOCBOOK_PDF = NO
83 # -------- Profile the stage2 compiler ---------------------------------------
85 ifeq "$(BuildFlavour)" "prof"
87 SRC_HC_OPTS = -H64m -O0 -fasm
88 GhcStage1HcOpts = -O -fasm
89 GhcStage2HcOpts = -O -fasm
90 GhcLibHcOpts = -O -fasm
97 BUILD_DOCBOOK_HTML = NO
99 BUILD_DOCBOOK_PDF = NO
104 # -------- A Development build (stage 1) -------------------------------------
106 ifeq "$(BuildFlavour)" "devel1"
108 SRC_HC_OPTS = -H64m -O -fasm
109 GhcLibHcOpts = -O -dcore-lint
110 GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
111 GhcStage2HcOpts = -Rghc-timing -O -fasm
114 BUILD_DOCBOOK_HTML = NO
115 BUILD_DOCBOOK_PS = NO
116 BUILD_DOCBOOK_PDF = NO
120 # -------- A Development build (stage 2) -------------------------------------
122 ifeq "$(BuildFlavour)" "devel2"
124 SRC_HC_OPTS = -H64m -O -fasm
125 GhcLibHcOpts = -O -dcore-lint
126 GhcStage1HcOpts = -Rghc-timing -O -fasm
127 GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
130 BUILD_DOCBOOK_HTML = NO
131 BUILD_DOCBOOK_PS = NO
132 BUILD_DOCBOOK_PDF = NO
136 # -----------------------------------------------------------------------------
137 # Other settings that might be useful