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