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 (slow build)
13 # Fastest build (libs unoptimised):
14 #BuildFlavour = quickest
16 # Fast build with optimised libraries:
19 # A development build, working on the stage 1 compiler:
20 #BuildFlavour = devel1
22 # A development build, working on the stage 2 compiler:
23 #BuildFlavour = devel2
25 # Which warnings we like to use
26 MyWarningOpts = -W -fno-warn-unused-matches -fwarn-unused-imports
30 # -------- 1. A Performance/Distribution build--------------------------------
32 ifeq "$(BuildFlavour)" "perf"
34 # perf matches the default settings, repeated here for comparison:
36 SRC_HC_OPTS = -O -H64m
37 GhcStage1HcOpts = -O -fasm
38 GhcStage2HcOpts = -O2 -fasm
39 GhcHcOpts = -Rghc-timing
40 GhcLibHcOpts = -O2 -XGenerics
45 # -------- A Fast build ------------------------------------------------------
47 ifeq "$(BuildFlavour)" "quickest"
49 SRC_HC_OPTS = -H64m -O0 -fasm
50 GhcStage1HcOpts = -O -fasm
51 GhcStage2HcOpts = -O0 -fasm
52 GhcLibHcOpts = -O0 -fasm
57 # -------- A Fast build with optimised libs ----------------------------------
59 ifeq "$(BuildFlavour)" "quick"
61 SRC_HC_OPTS = -H64m -O0 -fasm
62 GhcStage1HcOpts = -O -fasm
63 GhcStage2HcOpts = -O0 -fasm
64 GhcLibHcOpts = -O -fasm
69 # -------- A Development build (stage 1) -------------------------------------
71 ifeq "$(BuildFlavour)" "devel1"
73 SRC_HC_OPTS = -H64m -O -fasm $(MyWarningOpts)
74 GhcLibHcOpts = -O -dcore-lint $(MyWarningOpts)
75 GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
76 GhcStage2HcOpts = -Rghc-timing -O -fasm
81 # -------- A Development build (stage 2) -------------------------------------
83 ifeq "$(BuildFlavour)" "devel2"
85 SRC_HC_OPTS = -H64m -O -fasm $(MyWarningOpts)
86 GhcLibHcOpts = -O -dcore-lint $(MyWarningOpts)
87 GhcStage1HcOpts = -Rghc-timing -O -fasm
88 GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
93 # -----------------------------------------------------------------------------
94 # Other settings that might be useful
97 #GhcRtsCcOpts = -pg -g
99 # Optimised/profiled RTS
100 #GhcRtsCcOpts = -O2 -pg
102 #GhcRtsWithFrontPanel = YES
103 #SRC_HC_OPTS += `gtk-config --libs`