Removed all STL template code from load balancer. Too bad STL doesn't work
[charm.git] / src / scripts / Makefile
1 #############################################################################"
2 #
3 # This one Makefile serves all of converse and charm.  It includes
4 # rules for building:
5 #
6 #     * The CONVERSE libraries
7 #     * Charm++ runtime
8 #     * ITC++ Translator
9 #     * Charm++ IDL Translator
10 #     * Languages
11
12 # This Makefile is common to all machines.  This works because the charmc
13 # is smart enough to "conceal" the differences between machines.  charmc
14 # gets its smarts by reading the conv-mach.sh configuration file.
15 #
16 # If you wish to compile with debugging, optimization, or some other charm
17 # option, you can do so by setting OPTS.  For example, if you need a lot
18 # of debugging information, you could type:
19 #
20 #     make charm++ OPTS="-g -save -verbose"
21 #
22 ###############################################################################
23
24 SHELL=/bin/sh
25
26 all: charm++ libs IDL tsm sm pvm sdag
27
28 charm++: converse charmxi charmlibs
29
30 IDL: charm++ charmidl libidl.a
31
32 tsm: converse libtsm.a
33
34 sm: converse libsm.a
35
36 pvm: converse libpvmc.a
37
38 sdag: charm++ sdagx libsdag.a
39
40 translators: sdagx charmxi conv-cpm charmidl
41
42 libs: convlibs charmlibs
43         cd libs; make otherlibs OPTS='$(OPTS)'
44
45 test-all: all
46         cd ../pgms ; make test-all  OPTS='$(OPTS)'
47
48 test-converse: converse
49         cd ../pgms ; make test-converse  OPTS='$(OPTS)'
50
51 CHARMC=../bin/charmc $(CHARMOPTS) $(OPTS)
52
53 SEQCHARMC=../bin/charmc -seq $(CHARMOPTS)
54
55
56 ###############################################################################
57 #
58 # The basics (bin, lib, include, headers, charmc, conv-mach.sh)
59 #
60 ###############################################################################
61
62 ALLHEADERS=charm++.h ckstream.h charm.h cpthreads.h converse.h \
63         conv-trace.h conv-mach.h simplemsg.h sm.h trace.h pvmc.h \
64         pvm3.h sdag.h CDep.h CCounter.h CMsgBuffer.h CWhenTrigger.h \
65         TList.h idl.h ckarray.h tempo.h waitqd.h LBDatabase.h \
66         lbdb.h LBDBManager.h LBComm.h LBOM.h LBObj.h LBMachineUtil.h \
67         CentralLB.h RandCentLB.h RefineLB.h MetisLB.h HeapCentLB.h \
68         Set.h elements.h heap.h conv-ccs.h NeighborLB.h WSLB.h CkLists.h
69
70 ALLINTERFACES=idl.ci
71
72 basics: dirs+sources $(ALLHEADERS) $(ALLINTERFACES) charmc conv-mach.sh
73         rm -rf ../include
74         mkdir ../include
75         cp $(ALLHEADERS) ../include/
76         cp $(ALLINTERFACES) ../include/
77         rm -f ../bin/charmc ; cp charmc ../bin/
78         chmod 755 ../bin/charmc
79         cp conv-mach.sh ../include/
80         touch basics
81
82 dirs+sources:
83         @rm -f .vdir .gdir
84         @(cd .. ; basename `pwd`)                       > .vdir
85         @(cd .. ; basename `pwd` | sed -e 's@-.*@@')    > .gdir
86         @echo
87         @echo 'Gathering source code.'
88         @echo
89         find . -type l -exec rm {} \;
90         rm -rf QuickThreads
91         rm -rf ../bin ; mkdir ../bin
92         rm -rf ../lib ; mkdir ../lib
93         rm -rf ../src ; mkdir ../src
94         rm -rf ../pgms
95         rm -rf ../libsrc
96         ../../src/Common/scripts/gatherflat ../../src/Common/scripts .
97         ./gatherflat ../../src/Common/conv-core        .
98         ./gatherflat ../../src/Common/conv-ldb         .
99         ./gatherflat ../../src/Common/ck-core          .
100         ./gatherflat ../../src/Common/ck-perf          .
101         ./gatherflat ../../src/Common/ck-ldb           .
102         ./gatherflat ../../src/Common/langs/simplemsg  .
103         ./gatherflat ../../src/Common/langs/pvmc       .
104         ./gatherflat ../../src/Common/langs/sdag/xlator       .
105         ./gatherflat ../../src/Common/langs/sdag/runtime      .
106         ./gatherflat ../../src/Common/xlat-i           .
107         ./gatherflat ../../src/Common/xlat-idl         .
108         ./gatherflat ../../src/Common/xlatcpm          .
109         ./gathertree ../../src/QuickThreads QuickThreads
110         ./gathertree ../../src/Common/libs libs
111         ./gatherflat ../../src/Common.`cat .gdir`      .
112         ./gatherflat ../../src/`cat .vdir`             .
113         ./gathertree ../../src/Common/langs   ../src/langs
114         ./gathertree ../../src/Common/xlat-i  ../src/xlat-i
115         ./gathertree ../../src/Common/xlat-idl  ../src/xlat-idl
116         ./gathertree ../../src/Common/xlatcpm ../src/xlatcpm
117         ./gathertree ../../pgms ../pgms
118         ./gathertree ../../src/Common/libs ../libsrc
119         ln -s ../../src/Common/scripts/Makefile ../src
120         @echo
121         @echo
122         @rm -f .vdir .gdir
123         touch dirs+sources
124
125
126 ###############################################################################
127 #
128 # Converse Libraries
129 #
130 ###############################################################################
131
132 CVHEADERS=converse.h conv-mach.h conv-mach.sh \
133           ../include/CkFutures.decl.h CkFutures.def.h \
134           ../include/CkArray.decl.h CkArray.def.h \
135           ../include/LBDatabase.decl.h LBDatabase.def.h \
136           ../include/CentralLB.decl.h CentralLB.def.h \
137           ../include/RandCentLB.decl.h RandCentLB.def.h \
138           ../include/MetisLB.decl.h MetisLB.def.h \
139           ../include/RefineLB.decl.h RefineLB.def.h \
140           ../include/HeapCentLB.decl.h HeapCentLB.def.h \
141           ../include/NeighborLB.decl.h NeighborLB.def.h \
142           ../include/WSLB.decl.h WSLB.def.h \
143           ../include/tempo.decl.h tempo.def.h \
144           ../include/waitqd.decl.h waitqd.def.h
145
146 TRACELIBS=libtrace-none.a libtrace-projections.a libtrace-summary.a
147
148 CVLIBS=libconv-core.a libconv-cplus-n.a libconv-cplus-y.a libldb-rand.o libldb-spray.o libldb-graph.o libldb-test.o $(TRACELIBS)
149
150 LIBCONV_CORE=threads.o convcore.o conv-conds.o spantree.o queueing.o fifo.o msgmgr.o memory.o cpm.o cpthreads.o futures.o cldb.o random.o debug-message.o debug-object.o info.o generate.o edgelist.o conv-ccs.o
151
152 converse: basics QuickThreads/libckqt.a $(CVLIBS) conv-host-if-needed conv-cpm convlibs
153
154 conv-host-if-needed:
155         if [ -f conv-host.c ] ; then make conv-host OPTS='$(OPTS)' ; fi
156
157 QuickThreads/libckqt.a:
158         . ./conv-mach.sh;cd QuickThreads;./configure $$CMK_QT
159         cd QuickThreads ; make qt  OPTS='$(OPTS)'
160         cp QuickThreads/libqt.a ../lib/libckqt.a
161
162 conv-host: conv-host.c
163         ../bin/charmc $(OPTS) -c -seq -DSILENT conv-host.c
164         ../bin/charmc $(OPTS) -cp ../bin -seq -o conv-host-silent conv-host.o
165         ../bin/charmc $(OPTS) -c -seq -DNOTIFY conv-host.c
166         ../bin/charmc $(OPTS) -cp ../bin -seq -o conv-host-notify conv-host.o
167         cp conv-host-notify conv-host
168         cp conv-host ../bin/conv-host
169
170 convlibs:
171         cd libs; make convlibs OPTS='$(OPTS)'
172
173 libconv-core.a: $(LIBCONV_CORE)
174         $(CHARMC) -cp ../lib/ -o $@ $(LIBCONV_CORE)
175
176 libconv-cplus-y.a: machine.c $(CVHEADERS)       
177         $(CHARMC) -cp ../lib/ -o $@ -DFOR_CPLUS=1 machine.c
178
179 libconv-cplus-n.a: machine.c $(CVHEADERS)
180         $(CHARMC) -cp ../lib/ -o $@ -DFOR_CPLUS=0 machine.c
181
182 cpm.o: cpm.c $(CVHEADERS)
183         $(CHARMC) cpm.c
184
185 fifo.o: fifo.c $(CVHEADERS)
186         $(CHARMC) fifo.c
187
188 threads.o: threads.c $(CVHEADERS)
189         $(CHARMC) -IQuickThreads threads.c
190
191 spantree.o: spantree.c $(CVHEADERS)
192         $(CHARMC) spantree.c
193
194 convcore.o: convcore.c $(CVHEADERS)
195         $(CHARMC) convcore.c
196
197 conv-ccs.o: conv-ccs.c $(CVHEADERS)
198         $(CHARMC) conv-ccs.c
199
200 random.o: random.c $(CVHEADERS)
201         $(CHARMC) random.c
202
203 queueing.o: queueing.c $(CVHEADERS)
204         $(CHARMC) queueing.c
205
206 conv-conds.o: conv-conds.c $(CVHEADERS)
207         $(CHARMC) conv-conds.c
208
209 futures.o: futures.c $(CVHEADERS)
210         $(CHARMC) futures.c
211
212 msgmgr.o: msgmgr.c $(CVHEADERS)
213         $(CHARMC) msgmgr.c
214
215 cpthreads.o: cpthreads.c $(CVHEADERS)
216         $(CHARMC) cpthreads.c
217
218 memory.o: memory.c $(CVHEADERS)
219         $(CHARMC) memory.c
220
221 edgelist.o : edgelist.c ../../src/Common/conv-ldb/typedefs.h $(CVHEADERS)
222         $(CHARMC) -I../../src/Common/conv-ldb/ edgelist.c
223
224 generate.o : generate.c ../../src/Common/conv-ldb/typedefs.h $(CVHEADERS)
225         $(CHARMC) -I../../src/Common/conv-ldb/ generate.c
226
227 cldb.o: cldb.c ../../src/Common/conv-ldb/cldb.h $(CVHEADERS)
228         $(CHARMC) -I../../src/Common/conv-ldb/ cldb.c
229
230 libldb-rand.o: cldb.rand.c ../../src/Common/conv-ldb/cldb.h $(CVHEADERS)
231         $(CHARMC) -I../../src/Common/conv-ldb/ -cp ../lib/ -o $@ cldb.rand.c
232
233 libldb-graph.o: cldb.graph.c ../../src/Common/conv-ldb/cldb.graph.h $(CVHEADERS)
234         $(CHARMC) -I../../src/Common/conv-ldb/ -cp ../lib/ -o $@ cldb.graph.c 
235
236 libldb-spray.o: cldb.spray.c $(CVHEADERS)
237         $(CHARMC) -cp ../lib/ -o $@ cldb.spray.c
238
239 libldb-test.o: cldb.test.c $(CVHEADERS)
240         $(CHARMC) -cp ../lib/ -o $@ cldb.test.c
241
242 ###############################################################################
243 #
244 # Charm Libraries
245 #
246 ###############################################################################
247
248 CKHEADERS=ck.h ckstream.h envelope.h init.h qd.h charm.h charm++.h trace.h \
249           ckfutures.h ckarray.h tempo.h waitqd.h LBDatabase.h lbdb.h \
250           LBDBManager.h LBComm.h LBOM.h LBObj.h LBMachineUtil.h \
251           CentralLB.h RandCentLB.h RefineLB.h HeapCentLB.h MetisLB.h \
252           NeighborLB.h WSLB.h CkLists.h \
253           $(CVHEADERS)
254
255 CK_LIBS_CORE=libck.a
256
257 LIBCK_CORE=init.o register.o qd.o ck.o main.o msgalloc.o ckfutures.o \
258            ckarray.o tempo.o waitqd.o LBDatabase.o lbdb.o \
259            LBDBManager.o LBComm.o LBObj.o LBMachineUtil.o \
260            CentralLB.o RandCentLB.o MetisLB.o RefineLB.o Set.o \
261            HeapCentLB.o heap.o NeighborLB.o WSLB.o
262
263 charmlibs: converse $(CK_LIBS_CORE)
264         cd libs; make charmlibs OPTS='$(OPTS)'
265
266 libck.a: $(LIBCK_CORE)
267         $(CHARMC) -cp ../lib/ -o $@ $(LIBCK_CORE)
268
269 LIBTRACE_NONE=trace-none.o
270 libtrace-none.a: $(LIBTRACE_NONE)
271         $(CHARMC) -cp ../lib/ -o $@ $(LIBTRACE_NONE)
272
273 LIBTRACE_PROJ=trace-projections.o
274 libtrace-projections.a: $(LIBTRACE_PROJ)
275         $(CHARMC) -cp ../lib/ -o $@ $(LIBTRACE_PROJ)
276
277 LIBTRACE_SUMM=trace-summary.o
278 libtrace-summary.a: $(LIBTRACE_SUMM)
279         $(CHARMC) -cp ../lib/ -o $@ $(LIBTRACE_SUMM)
280
281 ../include/CkArray.decl.h : CkArray.decl.h
282         /bin/cp CkArray.decl.h ../include
283
284 ../include/LBDatabase.decl.h : LBDatabase.decl.h
285         /bin/cp LBDatabase.decl.h ../include
286
287 ../include/CentralLB.decl.h : CentralLB.decl.h
288         /bin/cp CentralLB.decl.h ../include
289
290 ../include/RandCentLB.decl.h : RandCentLB.decl.h
291         /bin/cp RandCentLB.decl.h ../include
292
293 ../include/MetisLB.decl.h : MetisLB.decl.h
294         /bin/cp MetisLB.decl.h ../include
295
296 ../include/RefineLB.decl.h : RefineLB.decl.h
297         /bin/cp RefineLB.decl.h ../include
298
299 ../include/HeapCentLB.decl.h : HeapCentLB.decl.h
300         /bin/cp HeapCentLB.decl.h ../include
301
302 ../include/NeighborLB.decl.h : NeighborLB.decl.h
303         /bin/cp NeighborLB.decl.h ../include
304
305 ../include/WSLB.decl.h : WSLB.decl.h
306         /bin/cp WSLB.decl.h ../include
307
308 ../include/CkFutures.decl.h : CkFutures.decl.h
309         /bin/cp CkFutures.decl.h ../include
310
311 CkFutures.decl.h CkFutures.def.h : ckfutures.ci charmxi
312         $(CHARMC) ckfutures.ci
313
314 ../include/tempo.decl.h : tempo.decl.h
315         /bin/cp tempo.decl.h ../include
316
317 tempo.decl.h tempo.def.h : tempo.ci charmxi
318         $(CHARMC) tempo.ci
319
320 ../include/waitqd.decl.h : waitqd.decl.h
321         /bin/cp waitqd.decl.h ../include
322
323 waitqd.decl.h waitqd.def.h : waitqd.ci charmxi
324         $(CHARMC) waitqd.ci
325
326 CkArray.decl.h CkArray.def.h : ckarray.ci charmxi
327         $(CHARMC) ckarray.ci
328
329 LBDatabase.decl.h LBDatabase.def.h : LBDatabase.ci charmxi
330         $(CHARMC) LBDatabase.ci
331
332 CentralLB.decl.h Central.def.h : CentralLB.ci charmxi
333         $(CHARMC) CentralLB.ci
334
335 RandCentLB.decl.h RandCent.def.h : RandCentLB.ci charmxi
336         $(CHARMC) RandCentLB.ci
337
338 MetisLB.decl.h MetisLB.def.h : MetisLB.ci charmxi
339         $(CHARMC) MetisLB.ci
340
341 RefineLB.decl.h RefineLB.def.h : RefineLB.ci charmxi
342         $(CHARMC) RefineLB.ci
343
344 HeapCentLB.decl.h HeapCentLB.def.h : HeapCentLB.ci charmxi
345         $(CHARMC) HeapCentLB.ci
346
347 NeighborLB.decl.h NeighborLB.def.h : NeighborLB.ci charmxi
348         $(CHARMC) NeighborLB.ci
349
350 WSLB.decl.h WS.def.h : WSLB.ci charmxi
351         $(CHARMC) WSLB.ci
352
353 init.o: init.C $(CKHEADERS)
354         $(CHARMC) -o init.o init.C
355
356 msgalloc.o: msgalloc.C $(CKHEADERS)
357         $(CHARMC) -o msgalloc.o msgalloc.C
358
359 register.o: register.C $(CKHEADERS)
360         $(CHARMC) -o register.o register.C
361
362 ckfutures.o: ckfutures.C $(CKHEADERS)
363         $(CHARMC) -o ckfutures.o ckfutures.C
364
365 tempo.o: tempo.C $(CKHEADERS)
366         $(CHARMC) -o tempo.o tempo.C
367
368 waitqd.o: waitqd.C $(CKHEADERS)
369         $(CHARMC) -o waitqd.o waitqd.C
370
371 ckarray.o: ckarray.C $(CKHEADERS)
372         $(CHARMC) -o ckarray.o ckarray.C
373
374 lbdb.o: lbdb.C $(CKHEADERS)
375         $(CHARMC) -o lbdb.o lbdb.C
376
377 LBDBManager.o:  LBDBManager.C $(CKHEADERS)
378         $(CHARMC) -o LBDBManager.o LBDBManager.C
379
380 LBComm.o:       LBComm.C $(CKHEADERS)
381         $(CHARMC) -o LBComm.o LBComm.C
382
383 LBObj.o: LBObj.C $(CKHEADERS)
384         $(CHARMC) -o LBObj.o LBObj.C
385
386 LBMachineUtil.o: LBObj.C $(CKHEADERS)
387         $(CHARMC) -o LBMachineUtil.o LBMachineUtil.C
388
389 LBDatabase.o: LBDatabase.C $(CKHEADERS)
390         $(CHARMC) -o LBDatabase.o LBDatabase.C
391
392 CentralLB.o: CentralLB.C $(CKHEADERS)
393         $(CHARMC) -o CentralLB.o CentralLB.C
394
395 RandCentLB.o: RandCentLB.C $(CKHEADERS)
396         $(CHARMC) -o RandCentLB.o RandCentLB.C
397
398 MetisLB.o: MetisLB.C $(CKHEADERS)
399         $(CHARMC) -o MetisLB.o MetisLB.C
400
401 RefineLB.o: RefineLB.C $(CKHEADERS)
402         $(CHARMC) -o RefineLB.o RefineLB.C
403
404 HeapCentLB.o: HeapCentLB.C $(CKHEADERS)
405         $(CHARMC) -o HeapCentLB.o HeapCentLB.C
406
407 Set.o: Set.C $(CKHEADERS) Set.h elements.h 
408         $(CHARMC) -o Set.o Set.C
409
410 heap.o: heap.C $(CKHEADERS) elements.h heap.h
411         $(CHARMC) -o heap.o heap.C
412
413 NeighborLB.o: NeighborLB.C $(CKHEADERS)
414         $(CHARMC) -o NeighborLB.o NeighborLB.C
415
416 WSLB.o: WSLB.C $(CKHEADERS)
417         $(CHARMC) -o WSLB.o WSLB.C
418
419 qd.o: qd.C $(CKHEADERS)
420         $(CHARMC) -o qd.o qd.C
421
422 main.o: main.C $(CKHEADERS)
423         $(CHARMC) -o main.o main.C
424
425 debug-object.o: debug-object.h debug-object.C $(CKHEADERS)
426         $(CHARMC) -o debug-object.o debug-object.C
427
428 debug-message.o: debug-message.C $(CKHEADERS)
429         $(CHARMC) -o debug-message.o debug-message.C
430
431 info.o: info.C $(CKHEADERS)
432         $(CHARMC) -o info.o info.C
433
434 ck.o: ck.C $(CKHEADERS)
435         $(CHARMC) -o ck.o ck.C
436
437 trace-none.o : trace-none.C trace.h $(CKHEADERS)
438         $(CHARMC) -o trace-none.o trace-none.C
439
440 trace-projections.o:trace-projections.C trace-projections.h trace.h $(CKHEADERS)
441         $(CHARMC) -o trace-projections.o trace-projections.C
442
443 trace-summary.o:trace-summary.C trace-summary.h trace.h $(CKHEADERS)
444         $(CHARMC) -o trace-summary.o trace-summary.C
445
446
447 ###############################################################################
448 #
449 # The CPM scanner
450 #
451 ###############################################################################
452
453 conv-cpm: conv-cpm.o
454         $(SEQCHARMC) -o conv-cpm -cp ../bin/ conv-cpm.o
455
456 conv-cpm.o: conv-cpm.c
457         $(SEQCHARMC) conv-cpm.c
458
459 ###############################################################################
460 #
461 # The interface translator
462 #
463 ###############################################################################
464
465 XIHEADERS=xi-symbol.h xi-util.h xi-grammar.tab.h
466 CHARMXI=xi-main.o xi-symbol.o xi-grammar.tab.o xi-scan.o xi-util.o
467
468 charmxi: $(CHARMXI)
469         $(SEQCHARMC) -language c++ -cp ../bin/ -o charmxi $(CHARMXI)
470
471 xi-main.o: xi-main.C $(XIHEADERS)
472         $(SEQCHARMC) xi-main.C
473
474 xi-symbol.o: xi-symbol.C $(XIHEADERS)
475         $(SEQCHARMC) xi-symbol.C
476
477 xi-util.o: xi-util.C $(XIHEADERS)
478         $(SEQCHARMC) xi-util.C
479
480 xi-grammar.tab.o: xi-grammar.tab.C $(XIHEADERS)
481         $(SEQCHARMC) xi-grammar.tab.C
482
483 xi-scan.o: xi-scan.C $(XIHEADERS)
484         $(SEQCHARMC) xi-scan.C
485
486 ###############################################################################
487 #
488 # Simple Messaging
489 #
490 ###############################################################################
491
492 libtsm.a: converse simplemsg.c simplemsg.h
493         $(CHARMC) -cp ../lib/ -o $@ simplemsg.c
494
495 libsm.a: converse sm.c sm.h
496         $(CHARMC) -cp ../lib/ -o $@ sm.c
497
498 ###############################################################################
499 #
500 # PVM
501 #
502 ###############################################################################
503
504 PVMC=pvmc_buf.o pvmc_comm.o pvmc_conv.o pvmc_main.o pvmc_pack.o pvmc_groups.o
505
506 libpvmc.a: converse $(PVMC)
507         $(CHARMC) -cp ../lib -o libpvmc.a $(PVMC)
508
509 pvmc_buf.o: pvmc_buf.c pvmc.h pvm3.h
510         $(CHARMC) -o $@ pvmc_buf.c
511
512 pvmc_conv.o: pvmc_conv.c pvmc.h pvm3.h
513         $(CHARMC) -o $@ pvmc_conv.c
514
515 pvmc_pack.o: pvmc_pack.c pvmc.h pvm3.h
516         $(CHARMC) -o $@ pvmc_pack.c
517
518 pvmc_comm.o: pvmc_comm.c pvmc.h pvm3.h
519         $(CHARMC) -o $@ pvmc_comm.c
520
521 pvmc_groups.o: pvmc_groups.c pvmc.h pvm3.h
522         $(CHARMC) -o $@ pvmc_groups.c
523
524 pvmc_main.o: pvmc_main.c pvmc.h pvm3.h
525         $(CHARMC) -o $@ pvmc_main.c
526
527 libsdag.a: CDep.o
528         $(CHARMC) -cp ../lib -o libsdag.a CDep.o
529
530 CDep.o: CDep.C CDep.h CMsgBuffer.h CWhenTrigger.h
531         $(CHARMC) -c CDep.C
532
533 SDAGOBJ=sdag-main.o trans.o CLexer.o CParser.o CParsedFile.o CParseNode.o \
534         sdag-globals.o CParseNodeProcess.o CEntry.o
535
536 sdagx: $(SDAGOBJ)
537         $(SEQCHARMC) -cp ../bin -o sdagx -language c++ $(SDAGOBJ)
538
539 sdag-main.o: sdag-main.C CLexer.h CToken.h
540         $(SEQCHARMC) -c sdag-main.C
541
542 trans.o: trans.c EToken.h
543         $(SEQCHARMC) -c trans.c
544
545 CLexer.o: CLexer.C CLexer.h
546         $(SEQCHARMC) -c CLexer.C
547
548 CParser.o: CParser.C CParser.h
549         $(SEQCHARMC) -c CParser.C
550
551 CParsedFile.o: CParsedFile.C CParsedFile.h
552         $(SEQCHARMC) -c CParsedFile.C
553
554 CParseNode.o: CParseNode.C CParseNode.h
555         $(SEQCHARMC) -c CParseNode.C
556
557 sdag-globals.o: sdag-globals.C sdag-globals.h
558         $(SEQCHARMC) -c sdag-globals.C
559
560 CParseNodeProcess.o: CParseNodeProcess.C CParseNode.h
561         $(SEQCHARMC) -c CParseNodeProcess.C
562
563 CEntry.o: CEntry.C CEntry.h
564         $(SEQCHARMC) -c CEntry.C
565
566 ###############################################################################
567 #
568 # Charm++ IDL
569 #
570 ###############################################################################
571
572 IDL_CFE_VERSION =       \"1.3.0\"
573 CPPFLAGS = -I. -DIDL_CFE_VERSION=$(IDL_CFE_VERSION)
574 CCFLAGS  = -g
575 IDLCHARMC = $(SEQCHARMC) $(CPPFLAGS) $(CCFLAGS)
576 RANLIB          = /bin/true
577 AR              = ar
578 ARFLAGS         = crv
579
580 drv_init.o: drv_init.cc
581         $(IDLCHARMC) drv_init.cc
582
583 drv_private.o: drv_private.cc
584         $(IDLCHARMC) drv_private.cc
585
586 drv_main.o: drv_main.cc
587         $(IDLCHARMC) drv_main.cc
588
589 drv_args.o: drv_args.cc
590         $(IDLCHARMC) drv_args.cc
591
592 drv_fork.o: drv_fork.cc
593         $(IDLCHARMC) drv_fork.cc
594
595 drv_link.o: drv_link.cc
596         $(IDLCHARMC) drv_link.cc
597
598 drv_preproc.o: drv_preproc.cc
599         $(IDLCHARMC) drv_preproc.cc
600
601 libdrv.a: drv_init.o drv_private.o drv_main.o drv_args.o drv_fork.o \
602           drv_link.o drv_preproc.o
603         $(AR) $(ARFLAGS) libdrv.a drv_init.o drv_private.o drv_main.o \
604                 drv_args.o drv_fork.o drv_link.o drv_preproc.o
605         $(RANLIB) $@
606
607 # Create the parser and lexer
608
609 fe_declarator.o: fe_declarator.cc
610         $(IDLCHARMC) fe_declarator.cc
611
612 fe_private.o: fe_private.cc
613         $(IDLCHARMC) fe_private.cc
614
615 fe_init.o: fe_init.cc
616         $(IDLCHARMC) fe_init.cc
617
618 fe_extern.o: fe_extern.cc
619         $(IDLCHARMC) fe_extern.cc
620
621 fe_interface_header.o: fe_interface_header.cc
622         $(IDLCHARMC) fe_interface_header.cc
623
624 y.tab.o: y.tab.cc
625         $(IDLCHARMC) y.tab.cc
626
627 lex.yy.o: lex.yy.cc
628         $(IDLCHARMC) lex.yy.cc
629
630 libfe.a: fe_declarator.o fe_init.o fe_extern.o fe_interface_header.o  \
631          y.tab.o lex.yy.o
632         $(AR) $(ARFLAGS) libfe.a fe_declarator.o fe_init.o fe_extern.o \
633                 fe_interface_header.o y.tab.o lex.yy.o
634         $(RANLIB) libfe.a
635
636 be_generator.o: be_generator.cc be.hh be_generator.hh be_classes.hh
637         $(IDLCHARMC) be_generator.cc 
638
639 be_classes.o: be_classes.cc be.hh be_generator.hh be_classes.hh
640         $(IDLCHARMC) be_classes.cc
641
642 be_init.o: be_init.cc be.hh be_generator.hh be_classes.hh
643         $(IDLCHARMC) be_init.cc 
644
645 be_produce.o: be_produce.cc be.hh be_generator.hh be_classes.hh
646         $(IDLCHARMC) be_produce.cc
647
648 be_args.o: be_args.cc be.hh be_generator.hh be_classes.hh
649         $(IDLCHARMC) be_args.cc
650
651 libbe.a: be_generator.o be_classes.o be_init.o be_produce.o be_args.o
652         $(AR) $(ARFLAGS) libbe.a be_generator.o be_classes.o \
653                 be_init.o be_produce.o be_args.o
654         $(RANLIB) libbe.a
655
656 ast_array.o: ast_array.cc
657         $(IDLCHARMC) ast_array.cc
658
659 ast_argument.o: ast_argument.cc
660         $(IDLCHARMC) ast_argument.cc
661
662 ast_attribute.o: ast_attribute.cc
663         $(IDLCHARMC) ast_attribute.cc
664
665 ast_check.o: ast_check.cc
666         $(IDLCHARMC) ast_check.cc
667
668 ast_concrete_type.o: ast_concrete_type.cc
669         $(IDLCHARMC) ast_concrete_type.cc
670
671 ast_constant.o: ast_constant.cc
672         $(IDLCHARMC) ast_constant.cc
673
674 ast_decl.o: ast_decl.cc
675         $(IDLCHARMC) ast_decl.cc
676
677 ast_enum.o: ast_enum.cc
678         $(IDLCHARMC) ast_enum.cc
679
680 ast_enum_val.o: ast_enum_val.cc
681         $(IDLCHARMC) ast_enum_val.cc
682
683 ast_exception.o: ast_exception.cc
684         $(IDLCHARMC) ast_exception.cc
685
686 ast_expression.o: ast_expression.cc
687         $(IDLCHARMC) ast_expression.cc
688
689 ast_field.o: ast_field.cc
690         $(IDLCHARMC) ast_field.cc
691
692 ast_interface.o: ast_interface.cc
693         $(IDLCHARMC)  ast_interface.cc
694
695 ast_interface_fwd.o: ast_interface_fwd.cc
696         $(IDLCHARMC) ast_interface_fwd.cc
697
698 ast_module.o: ast_module.cc
699         $(IDLCHARMC) ast_module.cc
700
701 ast_operation.o: ast_operation.cc
702         $(IDLCHARMC) ast_operation.cc
703
704 ast_predefined_type.o: ast_predefined_type.cc
705         $(IDLCHARMC) ast_predefined_type.cc
706
707 ast_root.o: ast_root.cc
708         $(IDLCHARMC) ast_root.cc
709
710 ast_sequence.o: ast_sequence.cc
711         $(IDLCHARMC) ast_sequence.cc
712
713 ast_string.o: ast_string.cc
714         $(IDLCHARMC) ast_string.cc
715
716 ast_structure.o: ast_structure.cc
717         $(IDLCHARMC) ast_structure.cc
718
719 ast_type.o: ast_type.cc
720         $(IDLCHARMC) ast_type.cc
721
722 ast_typedef.o: ast_typedef.cc
723         $(IDLCHARMC) ast_typedef.cc
724
725 ast_union.o: ast_union.cc
726         $(IDLCHARMC) ast_union.cc
727
728 ast_union_branch.o: ast_union_branch.cc
729         $(IDLCHARMC) ast_union_branch.cc
730
731 ast_union_label.o: ast_union_label.cc
732         $(IDLCHARMC) ast_union_label.cc
733
734 ast_generator.o: ast_generator.cc
735         $(IDLCHARMC) ast_generator.cc
736
737 ast_redef.o: ast_redef.cc
738         $(IDLCHARMC) ast_redef.cc
739
740 ast_recursive.o: ast_recursive.cc
741         $(IDLCHARMC) ast_recursive.cc
742
743 libast.a: ast_array.o ast_argument.o ast_attribute.o ast_check.o \
744           ast_concrete_type.o ast_constant.o ast_decl.o ast_enum.o \
745           ast_enum_val.o ast_exception.o ast_expression.o ast_field.o \
746           ast_interface.o ast_interface_fwd.o ast_module.o ast_operation.o \
747           ast_predefined_type.o ast_root.o ast_sequence.o ast_string.o \
748           ast_structure.o ast_type.o ast_typedef.o ast_union.o \
749           ast_union_branch.o ast_union_label.o ast_generator.o ast_redef.o \
750           ast_recursive.o
751         $(AR) $(ARFLAGS) libast.a ast_array.o ast_argument.o ast_attribute.o \
752                 ast_check.o ast_concrete_type.o ast_constant.o ast_decl.o \
753                 ast_enum.o ast_enum_val.o ast_exception.o ast_expression.o \
754                 ast_field.o ast_interface.o ast_interface_fwd.o ast_module.o \
755                 ast_operation.o ast_predefined_type.o ast_root.o \
756                 ast_sequence.o ast_string.o ast_structure.o ast_type.o \
757                 ast_typedef.o ast_union.o ast_union_branch.o \
758                 ast_union_label.o ast_generator.o ast_redef.o ast_recursive.o
759         $(RANLIB) $@
760
761 utl_scope.o: utl_scope.cc
762         $(IDLCHARMC) utl_scope.cc
763
764 utl_stack.o: utl_stack.cc
765         $(IDLCHARMC) utl_stack.cc
766
767 utl_string.o: utl_string.cc
768         $(IDLCHARMC) utl_string.cc
769
770 utl_decllist.o: utl_decllist.cc
771         $(IDLCHARMC) utl_decllist.cc
772
773 utl_labellist.o: utl_labellist.cc
774         $(IDLCHARMC) utl_labellist.cc
775
776 utl_namelist.o: utl_namelist.cc
777         $(IDLCHARMC) utl_namelist.cc
778
779 utl_exceptlist.o: utl_exceptlist.cc
780         $(IDLCHARMC) utl_exceptlist.cc
781
782 utl_strlist.o: utl_strlist.cc
783         $(IDLCHARMC) utl_strlist.cc
784
785 utl_list.o: utl_list.cc
786         $(IDLCHARMC) utl_list.cc
787
788 utl_exprlist.o: utl_exprlist.cc
789         $(IDLCHARMC) utl_exprlist.cc
790
791 utl_error.o: utl_error.cc
792         $(IDLCHARMC) utl_error.cc
793
794 utl_indenter.o: utl_indenter.cc
795         $(IDLCHARMC) utl_indenter.cc
796
797 utl_identifier.o: utl_identifier.cc
798         $(IDLCHARMC) utl_identifier.cc
799
800 utl_idlist.o: utl_idlist.cc
801         $(IDLCHARMC) utl_idlist.cc
802
803 utl_global.o: utl_global.cc
804         $(IDLCHARMC) utl_global.cc
805
806 libutil.a: utl_scope.o utl_stack.o utl_string.o utl_decllist.o \
807            utl_labellist.o utl_namelist.o utl_exceptlist.o utl_strlist.o \
808            utl_list.o utl_exprlist.o utl_error.o utl_indenter.o \
809            utl_identifier.o utl_idlist.o utl_global.o
810         $(AR) $(ARFLAGS) libutil.a  utl_scope.o utl_stack.o utl_string.o \
811                 utl_decllist.o utl_labellist.o utl_namelist.o \
812                 utl_exceptlist.o utl_strlist.o utl_list.o utl_exprlist.o \
813                 utl_error.o utl_indenter.o utl_identifier.o utl_idlist.o \
814                 utl_global.o
815         $(RANLIB) libutil.a
816
817 nr_narrow.o: nr_narrow.cc
818         $(IDLCHARMC) nr_narrow.cc
819
820 libnarrow.a: nr_narrow.o
821         $(AR) $(ARFLAGS) libnarrow.a nr_narrow.o
822         $(RANLIB) libnarrow.a
823
824 charmidl: libdrv.a libbe.a libfe.a libast.a libutil.a libnarrow.a
825         $(IDLCHARMC) -o charmidl -language c++ -cp ../bin libdrv.a libbe.a \
826                 libfe.a libast.a libutil.a libnarrow.a
827
828 libidl.a: idl.o
829         $(CHARMC) -cp ../lib/ -o libidl.a idl.o
830         /bin/cp idl.decl.h ../include/
831
832 idl.o: basics idl.C idl.h idl.decl.h idl.def.h
833         $(CHARMC) -c idl.C
834
835 idl.decl.h idl.def.h: charmxi idl.ci
836         $(CHARMC) idl.ci
837         /bin/cp idl.decl.h ../include/
838
839 ###############################################################################
840 #
841 # Make clean
842 #
843 ###############################################################################
844
845 clean:
846         rm -f conv-host conv-host-notify conv-host-silent charmxi conv-cpm
847         rm -f TAGS basics cmk_extras core
848         rm -f core *.a
849         rm -f core *.o
850         rm -f core #*#
851         rm -f core *~
852
853 veryclean:
854         rm -rf ../bin
855         rm -rf ../lib
856         rm -rf ../src
857         rm -rf ../pgms
858         rm -rf ../include
859         mv Makefile .Makefile
860         rm -rf [a-z]* [A-Z]*
861         mv .Makefile Makefile
862         rm -rf .[a-z]* .[A-Z]*