911f5025ec6f52e7f47030695653281a02085083
[ghc-hetmet.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 # Which warnings we like to use
26 MyWarningOpts   = -W -fno-warn-unused-matches -fwarn-unused-imports
27
28 # -------- 1. A Performance/Distribution build--------------------------------
29
30 ifeq "$(BuildFlavour)" "perf"
31
32 # perf matches the default settings, repeated here for comparison:
33
34 SRC_HC_OPTS     = -O -H64m
35 GhcStage1HcOpts = -O -fasm
36 GhcStage2HcOpts = -O2 -fasm
37 GhcHcOpts       = -Rghc-timing
38 GhcLibHcOpts    = -O2 -XGenerics
39 GhcLibWays      = p
40
41 endif
42
43 # -------- A Fast build ------------------------------------------------------
44
45 ifeq "$(BuildFlavour)" "quickest"
46
47 SRC_HC_OPTS     = -H64m -O0 -fasm
48 GhcStage1HcOpts = -O -fasm
49 GhcStage2HcOpts = -O0 -fasm
50 GhcLibHcOpts    = -O0 -fasm
51 GhcLibWays      =
52 SplitObjs       = NO
53
54 endif
55
56 # -------- A Fast build with optimised libs ----------------------------------
57
58 ifeq "$(BuildFlavour)" "quick"
59
60 SRC_HC_OPTS     = -H64m -O0 -fasm
61 GhcStage1HcOpts = -O -fasm
62 GhcStage2HcOpts = -O0 -fasm
63 GhcLibHcOpts    = -O -fasm
64 GhcLibWays      =
65 SplitObjs       = NO
66
67 endif
68
69 # -------- A Development build (stage 1) -------------------------------------
70
71 ifeq "$(BuildFlavour)" "devel1"
72
73 SRC_HC_OPTS     = -H64m -O -fasm $(MyWarningOpts)
74 GhcLibHcOpts    = -O -dcore-lint $(MyWarningOpts)
75 GhcLibWays      =
76 GhcStage1HcOpts = -Rghc-timing -O0 -DDEBUG
77 GhcStage2HcOpts = -Rghc-timing -O -fasm
78 SplitObjs = NO
79
80 endif
81
82 # -------- A Development build (stage 2) -------------------------------------
83
84 ifeq "$(BuildFlavour)" "devel2"
85
86 SRC_HC_OPTS     = -H64m -O -fasm $(MyWarningOpts)
87 GhcLibHcOpts    = -O -dcore-lint $(MyWarningOpts)
88 GhcLibWays      =
89 GhcStage1HcOpts = -Rghc-timing -O -fasm
90 GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
91 SplitObjs = NO
92
93 endif
94
95 # -----------------------------------------------------------------------------
96 # Other settings that might be useful
97
98 # profiled RTS
99 #GhcRtsCcOpts =  -pg -g
100
101 # Optimised/profiled RTS
102 #GhcRtsCcOpts = -O2 -pg
103
104 #GhcRtsWithFrontPanel = YES
105 #SRC_HC_OPTS += `gtk-config --libs`
106
107 # NoFib settings
108 NoFibWays =
109 STRIP=: