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