[project @ 1996-01-11 14:06:51 by partain]
[ghc-hetmet.git] / ghc / runtime / Jmakefile
1 /* This is the Jmakefile for the runtime-system stuff.
2    This stuff is written in C (and cannot be written in Haskell).
3
4    Things are organised into exactly one level of subdirs.
5
6    At the moment, there are a few such subdirs:
7         c-as-asm        -- mini-interpreter & register hackery
8         gum             -- GUM-specific stuff
9         io              -- support for libPOSIX
10         main            -- "main", associated startup stuff, & MISC things
11         prims           -- code for primitives that must be written in C
12         profiling       -- cost-centre profiling
13         storage         -- the storage manager(s)
14
15    We create two libraries.  One, libHSrts<tag>.a, is built separately
16    for each "build".  The other, libHSclib.a is built once: it is just
17    .lc files that end up the same no matter what, i.e. completely
18    ordinary C.
19
20    Other sorta independent, compile-once subdirs are:
21
22         gmp             -- GNU multi-precision library (for Integer)
23         regex           -- GNU regexp package
24 */
25
26 #define IHaveSubdirs
27
28 SUBDIRS = gmp regex
29
30 /****************************************************************
31 *                                                               *
32 * Jmakefile preamble-y things                                   *
33 *                                                               *
34 ****************************************************************/
35
36 GhcDriverNeededHere(depend all) /* we use its C-compiling know-how */
37 EtagsNeededHere(tags)
38
39 /****************************************************************
40 *                                                               *
41 * options used for compiling/etc. things                        *
42 *                                                               *
43 ****************************************************************/
44
45 /*
46 If you use EXTRA_HC_OPTS on the command line (which you shouldn't,
47 strictly speaking), it will probably work -- it is pinned onto
48 GHC_OPTS, just for fun.
49 */
50
51 GHC_OPTS = -O2-for-C $(EXTRA_HC_OPTS)
52
53 /* per-build options: shared with libraries */
54 #define rts_or_lib(r,l) r
55 #include "../mkworld/GHC_OPTS"
56
57 MKDEPENDC_OPTS= \
58         -I$(TOP_PWD)/$(CURRENT_DIR)/$(GHC_INCLUDES)
59
60 /****************************************************************
61 *                                                               *
62 * what it is we are compiling;                                  *
63 *   these are long and tedious lists, but c'est la guerre       *
64 *                                                               *
65 ****************************************************************/
66
67 RTS_LH =                                \
68         storage/SMmarkDefs.lh           \
69         storage/SMcopying.lh            \
70         storage/SMcompacting.lh         \
71         storage/SMextn.lh               \
72         storage/SMinternal.lh
73
74 RTS_LC =                                \
75         c-as-asm/CallWrap_C.lc          \
76         c-as-asm/FreeMallocPtr.lc       \
77         c-as-asm/HpOverflow.lc          \
78         c-as-asm/StablePtr.lc           \
79         c-as-asm/StablePtrOps.lc        \
80         c-as-asm/StgDebug.lc            \
81         c-as-asm/StgMiniInt.lc          \
82         gum/GlobAddr.lc                 \
83         gum/HLComms.lc                  \
84         gum/Hash.lc                     \
85         gum/LLComms.lc                  \
86         gum/Pack.lc                     \
87         gum/ParInit.lc                  \
88         gum/RBH.lc                      \
89         gum/Sparks.lc                   \
90         gum/Unpack.lc                   \
91         main/GranSim.lc                 \
92         main/Itimer.lc                  \
93         main/Ticky.lc                   \
94         main/SMRep.lc                   \
95         main/Select.lc                  \
96         main/Signals.lc                 \
97         main/StgOverflow.lc             \
98         main/Threads.lc                 \
99         main/RtsFlags.lc                \
100         main/main.lc                    \
101         prims/PrimArith.lc              \
102         prims/PrimMisc.lc               \
103         profiling/CostCentre.lc         \
104         profiling/Hashing.lc            \
105         profiling/HeapProfile.lc        \
106         profiling/Indexing.lc           \
107         profiling/Timer.lc              \
108         storage/SM1s.lc                 \
109         storage/SM2s.lc                 \
110         storage/SMap.lc                 \
111         storage/SMcheck.lc              \
112         storage/SMcompacting.lc         \
113         storage/SMcopying.lc            \
114         storage/SMdu.lc                 \
115         storage/SMevac.lc               \
116         storage/SMextn.lc               \
117         storage/SMinit.lc /*could clib except for GCdu option! */ \
118         storage/SMmarking.lc            \
119         storage/SMscan.lc               \
120         storage/SMscav.lc               \
121         storage/SMstacks.lc             \
122         storage/SMstatic.lc             \
123         storage/SMstats.lc /*could clib except GCap affects printing*/ \
124         storage/mprotect.lc
125
126 /*LATER?: storage/SMgen.lc */
127
128 RTS_LHC =                               \
129         main/StgStartup.lhc             \
130         main/StgUpdate.lhc              \
131         main/StgThreads.lhc             \
132         c-as-asm/PerformIO.lhc          \
133         storage/SMmark.lhc              \
134         gum/FetchMe.lhc
135
136 #if GhcWithReadline == YES
137 # define __readline_cfile io/ghcReadline.lc
138 #else
139 # define __readline_cfile /*none*/
140 #endif
141
142 CLIB_LC =                               \
143         hooks/ErrorHdr.lc               \
144         hooks/OutOfHeap.lc              \
145         hooks/OutOfStk.lc               \
146         hooks/OutOfVM.lc                \
147         hooks/PatErrorHdr.lc            \
148         hooks/TraceHooks.lc             \
149         hooks/SizeHooks.lc              \
150         io/closeFile.lc                 \
151         io/createDirectory.lc           \
152         io/env.lc                       \
153         io/errno.lc                     \
154         io/execvpe.lc                   \
155         io/fileEOF.lc                   \
156         io/fileGetc.lc                  \
157         io/fileLookAhead.lc             \
158         io/filePosn.lc                  \
159         io/filePutc.lc                  \
160         io/fileSize.lc                  \
161         io/flushFile.lc                 \
162         io/getBufferMode.lc             \
163         io/getCPUTime.lc                \
164         io/getClockTime.lc              \
165         io/getCurrentDirectory.lc       \
166         io/getDirectoryContents.lc      \
167         io/getLock.lc                   \
168         io/inputReady.lc                \
169         io/openFile.lc                  \
170         io/readFile.lc                  \
171         io/removeDirectory.lc           \
172         io/removeFile.lc                \
173         io/renameDirectory.lc           \
174         io/renameFile.lc                \
175         io/seekFile.lc                  \
176         io/setBuffering.lc              \
177         io/setCurrentDirectory.lc       \
178         io/showTime.lc                  \
179         io/system.lc                    \
180         io/toClockSec.lc                \
181         io/toLocalTime.lc               \
182         io/toUTCTime.lc                 \
183         io/writeFile.lc                 \
184         main/Mallocs.lc                 \
185         prims/ByteOps.lc __readline_cfile
186
187 H_FILES = $(RTS_LH:.lh=.h)
188 C_FILES = $(RTS_LC:.lc=.c) $(RTS_LHC:.lhc=.hc) $(CLIB_LC:.lc=.c)
189
190 /* Header files */
191
192 all depend :: $(H_FILES)
193
194 ExtraStuffToClean ( $(C_FILES) )
195
196 /* Literate-pgmming suffix rules used herein */
197 LitSuffixRule(.lhc,.hc)
198 LitSuffixRule(.lc,.c)
199 LitSuffixRule(.lh,.h)
200
201 /****************************************************************
202 *                                                               *
203 * interesting collections of .o files                           *
204 *                                                               *
205 ****************************************************************/
206
207 RTS_OBJS_norm = $(RTS_LC:.lc=.o)    $(RTS_LHC:.lhc=.o)
208 RTS_OBJS_p    = $(RTS_LC:.lc=_p.o)  $(RTS_LHC:.lhc=_p.o)
209 RTS_OBJS_t    = $(RTS_LC:.lc=_t.o)  $(RTS_LHC:.lhc=_t.o)
210 RTS_OBJS_u    = $(RTS_LC:.lc=_u.o)  $(RTS_LHC:.lhc=_u.o)
211 RTS_OBJS_mc   = $(RTS_LC:.lc=_mc.o) $(RTS_LHC:.lhc=_mc.o)
212 RTS_OBJS_mr   = $(RTS_LC:.lc=_mr.o) $(RTS_LHC:.lhc=_mr.o)
213 RTS_OBJS_mt   = $(RTS_LC:.lc=_mt.o) $(RTS_LHC:.lhc=_mt.o)
214 RTS_OBJS_mp   = $(RTS_LC:.lc=_mp.o) $(RTS_LHC:.lhc=_mp.o)
215 RTS_OBJS_mg   = $(RTS_LC:.lc=_mg.o) $(RTS_LHC:.lhc=_mg.o)
216 RTS_OBJS_2s   = $(RTS_LC:.lc=_2s.o) $(RTS_LHC:.lhc=_2s.o)
217 RTS_OBJS_1s   = $(RTS_LC:.lc=_1s.o) $(RTS_LHC:.lhc=_1s.o)
218 RTS_OBJS_du   = $(RTS_LC:.lc=_du.o) $(RTS_LHC:.lhc=_du.o)
219 RTS_OBJS_a    = $(RTS_LC:.lc=_a.o)  $(RTS_LHC:.lhc=_a.o)
220 RTS_OBJS_b    = $(RTS_LC:.lc=_b.o)  $(RTS_LHC:.lhc=_b.o)
221 RTS_OBJS_c    = $(RTS_LC:.lc=_c.o)  $(RTS_LHC:.lhc=_c.o)
222 RTS_OBJS_d    = $(RTS_LC:.lc=_d.o)  $(RTS_LHC:.lhc=_d.o)
223 RTS_OBJS_e    = $(RTS_LC:.lc=_e.o)  $(RTS_LHC:.lhc=_e.o)
224 RTS_OBJS_f    = $(RTS_LC:.lc=_f.o)  $(RTS_LHC:.lhc=_f.o)
225 RTS_OBJS_g    = $(RTS_LC:.lc=_g.o)  $(RTS_LHC:.lhc=_g.o)
226 RTS_OBJS_h    = $(RTS_LC:.lc=_h.o)  $(RTS_LHC:.lhc=_h.o)
227 RTS_OBJS_i    = $(RTS_LC:.lc=_i.o)  $(RTS_LHC:.lhc=_i.o)
228 RTS_OBJS_j    = $(RTS_LC:.lc=_j.o)  $(RTS_LHC:.lhc=_j.o)
229 RTS_OBJS_k    = $(RTS_LC:.lc=_k.o)  $(RTS_LHC:.lhc=_k.o)
230 RTS_OBJS_l    = $(RTS_LC:.lc=_l.o)  $(RTS_LHC:.lhc=_l.o)
231 RTS_OBJS_m    = $(RTS_LC:.lc=_m.o)  $(RTS_LHC:.lhc=_m.o)
232 RTS_OBJS_n    = $(RTS_LC:.lc=_n.o)  $(RTS_LHC:.lhc=_n.o)
233 RTS_OBJS_o    = $(RTS_LC:.lc=_o.o)  $(RTS_LHC:.lhc=_o.o)
234 RTS_OBJS_A    = $(RTS_LC:.lc=_A.o)  $(RTS_LHC:.lhc=_A.o)
235 RTS_OBJS_B    = $(RTS_LC:.lc=_B.o)  $(RTS_LHC:.lhc=_B.o)
236
237 CLIB_OBJS     = $(CLIB_LC:.lc=.o)
238
239 /****************************************************************
240 *                                                               *
241 * knock the "clib" (completely ordinary C, compiled once)       *
242 * stuff over the head first...                                  *
243 *                                                               *
244 ****************************************************************/
245
246 #define CompileClibishly(file,flags)                            @@\
247 CAT2(file,.o) : CAT2(file,.c)                                   @@\
248         $(RM) $@                                                @@\
249         $(GHC) -c -o CAT2(file,.o) $(GHCFLAGS) flags CAT2(file,.c)
250
251 NormalLibraryTarget(HSclib,$(CLIB_OBJS))
252 ExtraStuffToClean($(CLIB_OBJS))
253 #if DoInstallGHCSystem == YES
254 InstallLibraryTarget(HSclib,$(INSTLIBDIR_GHC))
255 #endif
256
257 /* all .lc files, so far */
258 CompileClibishly(hooks/ErrorHdr,)
259 CompileClibishly(hooks/OutOfHeap,)
260 CompileClibishly(hooks/OutOfStk,)
261 CompileClibishly(hooks/OutOfVM,)
262 CompileClibishly(hooks/PatErrorHdr,)
263 CompileClibishly(hooks/TraceHooks,)
264 CompileClibishly(hooks/SizeHooks,)
265 CompileClibishly(io/closeFile,)
266 CompileClibishly(io/createDirectory,)
267 CompileClibishly(io/env,)
268 CompileClibishly(io/errno,)
269 CompileClibishly(io/execvpe,)
270 CompileClibishly(io/fileEOF,)
271 CompileClibishly(io/fileGetc,)
272 CompileClibishly(io/fileLookAhead,)
273 CompileClibishly(io/filePosn,)
274 CompileClibishly(io/filePutc,)
275 CompileClibishly(io/fileSize,)
276 CompileClibishly(io/flushFile,)
277 CompileClibishly(io/getBufferMode,)
278 CompileClibishly(io/getCPUTime,)
279 CompileClibishly(io/getClockTime,)
280 CompileClibishly(io/getCurrentDirectory,)
281 CompileClibishly(io/getDirectoryContents,)
282 CompileClibishly(io/getLock,)
283 CompileClibishly(io/inputReady,)
284 CompileClibishly(io/openFile,)
285 CompileClibishly(io/readFile,)
286 CompileClibishly(io/removeDirectory,)
287 CompileClibishly(io/removeFile,)
288 CompileClibishly(io/renameDirectory,)
289 CompileClibishly(io/renameFile,)
290 CompileClibishly(io/seekFile,)
291 CompileClibishly(io/setBuffering,)
292 CompileClibishly(io/setCurrentDirectory,)
293 CompileClibishly(io/showTime,)
294 CompileClibishly(io/system,)
295 CompileClibishly(io/toClockSec,)
296 CompileClibishly(io/toLocalTime,)
297 CompileClibishly(io/toUTCTime,)
298 CompileClibishly(io/writeFile,)
299 CompileClibishly(main/Mallocs,)
300 CompileClibishly(main/TopClosure,)      /* NB */
301 CompileClibishly(main/TopClosure13,)    /* ditto */
302 CompileClibishly(prims/ByteOps,)
303 #if GhcWithReadline == YES
304 CompileClibishly(io/ghcReadline,)
305 #endif
306
307 ExtraStuffToClean(main/TopClosure.o main/TopClosure13.o)
308
309 all :: main/TopClosure.o main/TopClosure13.o
310
311 install :: main/TopClosure.o main/TopClosure13.o
312         $(INSTALL) -c $(INSTLIBFLAGS) main/TopClosure.o   $(INSTLIBDIR_GHC)/TopClosure.o
313         $(INSTALL) -c $(INSTLIBFLAGS) main/TopClosure13.o $(INSTLIBDIR_GHC)/TopClosure13.o
314
315 #if GhcBuild_mp == YES
316 # if solaris2_TARGET_OS
317 #  define __socket_libs -lsocket -lnsl
318 # else
319 #  define __socket_libs /*none*/
320 # endif
321
322 AllTarget(gum/SysMan)
323 gum/SysMan : gum/SysMan_mp.o gum/LLComms_mp.o main/Mallocs.o hooks/OutOfVM.o
324         $(RM) $@
325         $(CC) -o $@ gum/SysMan_mp.o gum/LLComms_mp.o main/Mallocs.o hooks/OutOfVM.o -L$$PVM_ROOT/lib/$$PVM_ARCH -lpvm3 -lgpvm3 __socket_libs
326 ExtraStuffToClean(gum/SysMan_mp.o gum/SysMan)
327 # if DoInstallGHCSystem == YES
328 install :: gum/SysMan
329         $(INSTALL) -c $(INSTBINFLAGS) gum/SysMan $(INSTLIBDIR_GHC)/SysMan
330 # endif
331 #endif
332
333 /****************************************************************
334 *                                                               *
335 * special local make-world macros                               *
336 *                                                               *
337 ****************************************************************/
338
339 /* to build and install the per-build rts stuff */
340
341 #ifndef SpecialGhcRtsLibTarget
342 #define SpecialGhcRtsLibTarget(tag,objs)                                        @@\
343 AllTarget(CAT3(libHSrts,tag,.a))                                                @@\
344 ExtraStuffToClean(objs CAT3(libHSrts,tag,.a))                                   @@\
345 CAT3(libHSrts,tag,.a):: $(H_FILES) objs                                         @@\
346         $(RM) $@                                                                @@\
347         $(AR) $@ objs                                                           @@\
348         $(RANLIB) $@
349 #endif /* SpecialGhcRtsLibTarget */
350
351 #ifndef SpecialGhcRtsLibInstallTarget
352 #if DoInstallGHCSystem == YES
353 #define SpecialGhcRtsLibInstallTarget(tag)                                      @@\
354 install :: CAT3(libHSrts,tag,.a)                                                @@\
355         $(INSTALL) $(INSTLIBFLAGS) \                                            @@\
356                 CAT3(libHSrts,tag,.a) \                                         @@\
357                 $(INSTLIBDIR_GHC)/CAT3(libHSrts,tag,.a)                         @@\
358         $(RANLIB) $(INSTLIBDIR_GHC)/CAT3(libHSrts,tag,.a)
359 #else /* ! DoInstallGHC... */
360 #define SpecialGhcRtsLibInstallTarget(tag) /*nothing*/
361 #endif /* ! DoInstallGHC... */
362 #endif /* SpecialGhcRtsLibInstallTarget */
363
364 #define BigBuildTarget(tag,objs)        \
365 SpecialGhcRtsLibTarget(tag,objs)        @@\
366 SpecialGhcRtsLibInstallTarget(tag)
367
368 /****************************************************************
369 *                                                               *
370 * creating and installing libHSrts.a (in its many flavors)      *
371 *                                                               *
372 ****************************************************************/
373
374 #if DoInstallGHCSystem == YES
375 MakeDirectories(install, $(INSTLIBDIR_GHC))
376 #endif /* DoInstallGHCSystem */
377
378 IfGhcBuild_normal(BigBuildTarget(,$(RTS_OBJS_norm)))
379 IfGhcBuild_p(BigBuildTarget(_p,   $(RTS_OBJS_p)))
380 IfGhcBuild_t(BigBuildTarget(_t,   $(RTS_OBJS_t)))
381 IfGhcBuild_u(BigBuildTarget(_u,   $(RTS_OBJS_u)))
382 IfGhcBuild_mc(BigBuildTarget(_mc, $(RTS_OBJS_mc)))
383 IfGhcBuild_mr(BigBuildTarget(_mr, $(RTS_OBJS_mr)))
384 IfGhcBuild_mt(BigBuildTarget(_mt, $(RTS_OBJS_mt)))
385 IfGhcBuild_mp(BigBuildTarget(_mp, $(RTS_OBJS_mp)))
386 IfGhcBuild_mg(BigBuildTarget(_mg, $(RTS_OBJS_mg)))
387 IfGhcBuild_2s(BigBuildTarget(_2s, $(RTS_OBJS_2s)))
388 IfGhcBuild_1s(BigBuildTarget(_1s, $(RTS_OBJS_1s)))
389 IfGhcBuild_du(BigBuildTarget(_du, $(RTS_OBJS_du)))
390 IfGhcBuild_a(BigBuildTarget(_a,   $(RTS_OBJS_a)))
391 IfGhcBuild_b(BigBuildTarget(_b,   $(RTS_OBJS_b)))
392 IfGhcBuild_c(BigBuildTarget(_c,   $(RTS_OBJS_c)))
393 IfGhcBuild_d(BigBuildTarget(_d,   $(RTS_OBJS_d)))
394 IfGhcBuild_e(BigBuildTarget(_e,   $(RTS_OBJS_e)))
395 IfGhcBuild_f(BigBuildTarget(_f,   $(RTS_OBJS_f)))
396 IfGhcBuild_g(BigBuildTarget(_g,   $(RTS_OBJS_g)))
397 IfGhcBuild_h(BigBuildTarget(_h,   $(RTS_OBJS_h)))
398 IfGhcBuild_i(BigBuildTarget(_i,   $(RTS_OBJS_i)))
399 IfGhcBuild_j(BigBuildTarget(_j,   $(RTS_OBJS_j)))
400 IfGhcBuild_k(BigBuildTarget(_k,   $(RTS_OBJS_k)))
401 IfGhcBuild_l(BigBuildTarget(_l,   $(RTS_OBJS_l)))
402 IfGhcBuild_m(BigBuildTarget(_m,   $(RTS_OBJS_m)))
403 IfGhcBuild_n(BigBuildTarget(_n,   $(RTS_OBJS_n)))
404 IfGhcBuild_o(BigBuildTarget(_o,   $(RTS_OBJS_o)))
405 IfGhcBuild_A(BigBuildTarget(_A,   $(RTS_OBJS_A)))
406 IfGhcBuild_B(BigBuildTarget(_B,   $(RTS_OBJS_B)))
407
408
409 /****************************************************************
410 *                                                               *
411 * compile the individual RTS files                              *
412 *                                                               *
413 ****************************************************************/
414
415 #define DoRtsFile(file,isuf,way,flags)                                   @@\
416 CAT3(file,way,.o) : CAT2(file,isuf)                                      @@\
417         $(RM) $@                                                         @@\
418         $(GHC) -c -o CAT3(file,way,.o) $(GHCFLAGS) flags CAT2(file,isuf)
419
420 #define CompileRTSishly(file,isuf,flags)                        @@\
421 IfGhcBuild_normal(DoRtsFile(file,isuf,,flags $(GHC_OPTS_norm))) \
422 IfGhcBuild_p(DoRtsFile(file,isuf,_p,   flags $(GHC_OPTS_p)))    \
423 IfGhcBuild_t(DoRtsFile(file,isuf,_t,   flags $(GHC_OPTS_t)))    \
424 IfGhcBuild_u(DoRtsFile(file,isuf,_u,   flags $(GHC_OPTS_u)))    \
425 IfGhcBuild_mc(DoRtsFile(file,isuf,_mc, flags $(GHC_OPTS_mc)))   \
426 IfGhcBuild_mr(DoRtsFile(file,isuf,_mr, flags $(GHC_OPTS_mr)))   \
427 IfGhcBuild_mt(DoRtsFile(file,isuf,_mt, flags $(GHC_OPTS_mt)))   \
428 IfGhcBuild_mp(DoRtsFile(file,isuf,_mp, flags $(GHC_OPTS_mp)))   \
429 IfGhcBuild_mg(DoRtsFile(file,isuf,_mg, flags $(GHC_OPTS_mg)))   \
430 IfGhcBuild_2s(DoRtsFile(file,isuf,_2s, flags $(GHC_OPTS_2s)))   \
431 IfGhcBuild_1s(DoRtsFile(file,isuf,_1s, flags $(GHC_OPTS_1s)))   \
432 IfGhcBuild_du(DoRtsFile(file,isuf,_du, flags $(GHC_OPTS_du)))   \
433 IfGhcBuild_a(DoRtsFile(file,isuf,_a,   flags $(GHC_OPTS_a)))    \
434 IfGhcBuild_b(DoRtsFile(file,isuf,_b,   flags $(GHC_OPTS_b)))    \
435 IfGhcBuild_c(DoRtsFile(file,isuf,_c,   flags $(GHC_OPTS_c)))    \
436 IfGhcBuild_d(DoRtsFile(file,isuf,_d,   flags $(GHC_OPTS_d)))    \
437 IfGhcBuild_e(DoRtsFile(file,isuf,_e,   flags $(GHC_OPTS_e)))    \
438 IfGhcBuild_f(DoRtsFile(file,isuf,_f,   flags $(GHC_OPTS_f)))    \
439 IfGhcBuild_g(DoRtsFile(file,isuf,_g,   flags $(GHC_OPTS_g)))    \
440 IfGhcBuild_h(DoRtsFile(file,isuf,_h,   flags $(GHC_OPTS_h)))    \
441 IfGhcBuild_i(DoRtsFile(file,isuf,_i,   flags $(GHC_OPTS_i)))    \
442 IfGhcBuild_j(DoRtsFile(file,isuf,_j,   flags $(GHC_OPTS_j)))    \
443 IfGhcBuild_k(DoRtsFile(file,isuf,_k,   flags $(GHC_OPTS_k)))    \
444 IfGhcBuild_l(DoRtsFile(file,isuf,_l,   flags $(GHC_OPTS_l)))    \
445 IfGhcBuild_m(DoRtsFile(file,isuf,_m,   flags $(GHC_OPTS_m)))    \
446 IfGhcBuild_n(DoRtsFile(file,isuf,_n,   flags $(GHC_OPTS_n)))    \
447 IfGhcBuild_o(DoRtsFile(file,isuf,_o,   flags $(GHC_OPTS_o)))    \
448 IfGhcBuild_A(DoRtsFile(file,isuf,_A,   flags $(GHC_OPTS_A)))    \
449 IfGhcBuild_B(DoRtsFile(file,isuf,_B,   flags $(GHC_OPTS_B)))
450
451 /* here we go: */
452
453 CompileRTSishly(c-as-asm/CallWrap_C,.c,)
454 CompileRTSishly(c-as-asm/FreeMallocPtr,.c,)
455 CompileRTSishly(c-as-asm/HpOverflow,.c,)
456 CompileRTSishly(c-as-asm/PerformIO,.hc,-optcO-DIN_GHC_RTS=1)
457 CompileRTSishly(c-as-asm/StablePtr,.c,)
458 CompileRTSishly(c-as-asm/StablePtrOps,.c,)
459 CompileRTSishly(c-as-asm/StgDebug,.c,)
460 CompileRTSishly(c-as-asm/StgMiniInt,.c,)
461 CompileRTSishly(gum/FetchMe,.hc,-optcO-DIN_GHC_RTS=1)
462 CompileRTSishly(gum/GlobAddr,.c,)
463 CompileRTSishly(gum/HLComms,.c,)
464 CompileRTSishly(gum/Hash,.c,)
465 CompileRTSishly(gum/LLComms,.c,)
466 CompileRTSishly(gum/Pack,.c,)
467 CompileRTSishly(gum/ParInit,.c,)
468 CompileRTSishly(gum/RBH,.c,)
469 CompileRTSishly(gum/Sparks,.c,)
470 CompileRTSishly(gum/SysMan,.c,) /* NB: not in library */
471 CompileRTSishly(gum/Unpack,.c,)
472 CompileRTSishly(main/GranSim,.c,)
473 CompileRTSishly(main/Itimer,.c,)
474 CompileRTSishly(main/Ticky,.c,)
475 CompileRTSishly(main/SMRep,.c,)
476 CompileRTSishly(main/Select,.c,)
477 CompileRTSishly(main/Signals,.c,)
478 CompileRTSishly(main/StgOverflow,.c,)
479 CompileRTSishly(main/StgStartup,.hc,-optcO-DIN_GHC_RTS=1)
480 CompileRTSishly(main/StgThreads,.hc,-optcO-DIN_GHC_RTS=1)
481 CompileRTSishly(main/StgUpdate,.hc,-optcO-DIN_GHC_RTS=1)
482 CompileRTSishly(main/Threads,.c,)
483 CompileRTSishly(main/RtsFlags,.c,)
484 CompileRTSishly(main/main,.c,)
485 CompileRTSishly(profiling/CostCentre,.c,)
486 CompileRTSishly(profiling/Hashing,.c,)
487 CompileRTSishly(profiling/HeapProfile,.c,)
488 CompileRTSishly(profiling/Indexing,.c,)
489 CompileRTSishly(profiling/Timer,.c,)
490 CompileRTSishly(prims/PrimArith,.c,)
491 CompileRTSishly(prims/PrimMisc,.c,)
492 CompileRTSishly(storage/SM1s,.c,)
493 CompileRTSishly(storage/SM2s,.c,)
494 CompileRTSishly(storage/SMap,.c,)
495 CompileRTSishly(storage/SMcheck,.c,)
496 CompileRTSishly(storage/SMcompacting,.c,)
497 CompileRTSishly(storage/SMcopying,.c,)
498 CompileRTSishly(storage/SMdu,.c,)
499 CompileRTSishly(storage/SMevac,.c,)
500 CompileRTSishly(storage/SMextn,.c,)
501 CompileRTSishly(storage/SMgen,.c,)
502 CompileRTSishly(storage/SMinit,.c,)
503 CompileRTSishly(storage/SMmark,.hc,-optcO-DIN_GHC_RTS=1 -optc-DMARK_REG_MAP)
504 CompileRTSishly(storage/SMmarking,.c,)
505 CompileRTSishly(storage/SMscan,.c,)
506 CompileRTSishly(storage/SMscav,.c,)
507 CompileRTSishly(storage/SMstacks,.c,)
508 CompileRTSishly(storage/SMstatic,.c,)
509 CompileRTSishly(storage/SMstats,.c,)
510 CompileRTSishly(storage/mprotect,.c,)
511
512 /****************************************************************
513 *                                                               *
514 * misc "make" targets -- depend, clean, tags                    *
515 *                                                               *
516 ****************************************************************/
517
518 ClearTagsFile()
519 /* this is not the way we should do this [WDP [lazy] 94/09] */
520 CTagsTarget( $(RTS_LC) $($RTS_LHC) $(CLIB_LC) )
521 CTagsTarget( gmp/[a-z]*.c )
522 CTagsTarget( regex/[a-z]*.c )
523
524 CDependTarget( $(RTS_LC) $($RTS_LHC) $(CLIB_LC) )
525
526 LitStuffNeededHere(docs depend)
527 InfoStuffNeededHere(docs)
528
529 /*LitDocRootTargetWithNamedOutput(threadroot,lit,threadroot-standalone)*/