so far for ppc
[archlinuxppc.git] / ghc / build.mk
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 # Profile the stage2 compiler:
20 #BuildFlavour = prof
21
22 # A development build, working on the stage 1 compiler:
23 #BuildFlavour = devel1
24
25 # A development build, working on the stage 2 compiler:
26 #BuildFlavour = devel2
27
28 GhcLibWays = v
29
30 # -------- 1. A Performance/Distribution build--------------------------------
31
32 ifeq "$(BuildFlavour)" "perf"
33
34 # perf matches the default settings, repeated here for comparison:
35
36 SRC_HC_OPTS     = -O -H64m
37 GhcStage1HcOpts = -O -fasm
38 GhcStage2HcOpts = -O2 -fasm
39 GhcHcOpts       = -Rghc-timing
40 GhcLibHcOpts    = -O2 -XGenerics
41 GhcLibWays     += p
42
43 ifeq "$(PlatformSupportsSharedLibs)" "YES"
44 GhcLibWays += dyn
45 endif
46
47 endif
48
49 # -------- A Fast build ------------------------------------------------------
50
51 ifeq "$(BuildFlavour)" "quickest"
52
53 SRC_HC_OPTS        = -H64m -O0 -fasm
54 GhcStage1HcOpts    = -O -fasm
55 GhcStage2HcOpts    = -O0 -fasm
56 GhcLibHcOpts       = -O0 -fasm
57 SplitObjs          = NO
58 HADDOCK_DOCS       = NO
59 BUILD_DOCBOOK_HTML = NO
60 BUILD_DOCBOOK_PS   = NO
61 BUILD_DOCBOOK_PDF  = NO
62
63 endif
64
65 # -------- A Fast build with optimised libs ----------------------------------
66
67 ifeq "$(BuildFlavour)" "quick"
68
69 SRC_HC_OPTS        = -H64m -O0 -fasm
70 GhcStage1HcOpts    = -O -fasm
71 GhcStage2HcOpts    = -O0 -fasm
72 GhcLibHcOpts       = -O -fasm
73 SplitObjs          = NO
74 HADDOCK_DOCS       = NO
75 BUILD_DOCBOOK_HTML = NO
76 BUILD_DOCBOOK_PS   = NO
77 BUILD_DOCBOOK_PDF  = NO
78
79 endif
80
81 # -------- Profile the stage2 compiler ---------------------------------------
82
83 ifeq "$(BuildFlavour)" "prof"
84
85 SRC_HC_OPTS        = -H64m -O0 -fasm
86 GhcStage1HcOpts    = -O -fasm
87 GhcStage2HcOpts    = -O -fasm
88 GhcLibHcOpts       = -O -fasm
89
90 GhcLibWays         += p
91 GhcProfiled        = YES
92
93 SplitObjs          = NO
94 HADDOCK_DOCS       = NO
95 BUILD_DOCBOOK_HTML = NO
96 BUILD_DOCBOOK_PS   = NO
97 BUILD_DOCBOOK_PDF  = NO
98
99 endif
100
101
102 # -------- A Development build (stage 1) -------------------------------------
103
104 ifeq "$(BuildFlavour)" "devel1"
105
106 SRC_HC_OPTS        = -H64m -O -fasm
107 GhcLibHcOpts       = -O -dcore-lint
108 GhcStage1HcOpts    = -Rghc-timing -O0 -DDEBUG
109 GhcStage2HcOpts    = -Rghc-timing -O -fasm
110 SplitObjs          = NO
111 HADDOCK_DOCS       = NO
112 BUILD_DOCBOOK_HTML = NO
113 BUILD_DOCBOOK_PS   = NO
114 BUILD_DOCBOOK_PDF  = NO
115
116 endif
117
118 # -------- A Development build (stage 2) -------------------------------------
119
120 ifeq "$(BuildFlavour)" "devel2"
121
122 SRC_HC_OPTS        = -H64m -O -fasm
123 GhcLibHcOpts       = -O -dcore-lint
124 GhcStage1HcOpts    = -Rghc-timing -O -fasm
125 GhcStage2HcOpts    = -Rghc-timing -O0 -DDEBUG
126 SplitObjs          = NO
127 HADDOCK_DOCS       = NO
128 BUILD_DOCBOOK_HTML = NO
129 BUILD_DOCBOOK_PS   = NO
130 BUILD_DOCBOOK_PDF  = NO
131
132 endif
133
134 # -----------------------------------------------------------------------------
135 # Other settings that might be useful
136
137 # profiled RTS
138 #GhcRtsCcOpts =  -pg -g
139
140 # Optimised/profiled RTS
141 #GhcRtsCcOpts = -O2 -pg
142
143 #GhcRtsWithFrontPanel = YES
144 #SRC_HC_OPTS += `gtk-config --libs`
145
146 # NoFib settings
147 NoFibWays =
148 STRIP=:
149
150