c49fd0355936b607309513e535297a28b5daa31c
[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 (slow build)
11 #BuildFlavour = perf
12
13 # Fastest build (libs unoptimised):
14 #BuildFlavour = quickest
15
16 # Fast build with optimised libraries:
17 #BuildFlavour = quick
18
19 # A development build, working on the stage 1 compiler:
20 #BuildFlavour = devel1
21
22 # A development build, working on the stage 2 compiler:
23 #BuildFlavour = devel2
24
25 GhcLibWays = v
26
27 # -------- 1. A Performance/Distribution build--------------------------------
28
29 ifeq "$(BuildFlavour)" "perf"
30
31 # perf matches the default settings, repeated here for comparison:
32
33 SRC_HC_OPTS     = -O -H64m
34 GhcStage1HcOpts = -O -fasm
35 GhcStage2HcOpts = -O2 -fasm
36 GhcHcOpts       = -Rghc-timing
37 GhcLibHcOpts    = -O2 -XGenerics
38 GhcLibWays     += p
39
40 endif
41
42 # -------- A Fast build ------------------------------------------------------
43
44 ifeq "$(BuildFlavour)" "quickest"
45
46 SRC_HC_OPTS        = -H64m -O0 -fasm
47 GhcStage1HcOpts    = -O -fasm
48 GhcStage2HcOpts    = -O0 -fasm
49 GhcLibHcOpts       = -O0 -fasm
50 SplitObjs          = NO
51 HADDOCK_DOCS       = NO
52 BUILD_DOCBOOK_HTML = NO
53 BUILD_DOCBOOK_PS   = NO
54 BUILD_DOCBOOK_PDF  = NO
55
56 endif
57
58 # -------- A Fast build with optimised libs ----------------------------------
59
60 ifeq "$(BuildFlavour)" "quick"
61
62 SRC_HC_OPTS        = -H64m -O0 -fasm
63 GhcStage1HcOpts    = -O -fasm
64 GhcStage2HcOpts    = -O0 -fasm
65 GhcLibHcOpts       = -O -fasm
66 SplitObjs          = NO
67 HADDOCK_DOCS       = NO
68 BUILD_DOCBOOK_HTML = NO
69 BUILD_DOCBOOK_PS   = NO
70 BUILD_DOCBOOK_PDF  = NO
71
72 endif
73
74 # -------- A Development build (stage 1) -------------------------------------
75
76 ifeq "$(BuildFlavour)" "devel1"
77
78 SRC_HC_OPTS        = -H64m -O -fasm
79 GhcLibHcOpts       = -O -dcore-lint
80 GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
81 GhcStage2HcOpts    = -Rghc-timing -O -fasm
82 SplitObjs          = NO
83 HADDOCK_DOCS       = NO
84 BUILD_DOCBOOK_HTML = NO
85 BUILD_DOCBOOK_PS   = NO
86 BUILD_DOCBOOK_PDF  = NO
87
88 endif
89
90 # -------- A Development build (stage 2) -------------------------------------
91
92 ifeq "$(BuildFlavour)" "devel2"
93
94 SRC_HC_OPTS        = -H64m -O -fasm
95 GhcLibHcOpts       = -O -dcore-lint
96 GhcStage1HcOpts    = -Rghc-timing -O -fasm
97 GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
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 # Other settings that might be useful
108
109 # profiled RTS
110 #GhcRtsCcOpts =  -pg -g
111
112 # Optimised/profiled RTS
113 #GhcRtsCcOpts = -O2 -pg
114
115 #GhcRtsWithFrontPanel = YES
116 #SRC_HC_OPTS += `gtk-config --libs`
117
118 # NoFib settings
119 NoFibWays =
120 STRIP=: