Polished/Updated the library and changed the example codes accordingly.
[charm.git] / example / simpleLoopBench / Makefile
1 #NOTE: to compile the example, the NodeHelper.decl/def.h should exist
2 USEROPTS=-O0 -g -lpthread
3 CHARMDIR=$(HOME)/curcvs/charm/net-linux-x86_64-smp-dbg/
4 CHARMINC=$(CHARMDIR)/include
5 OPTS=-I$(CHARMINC) $(USEROPTS)
6 CHARMC=$(CHARMDIR)/bin/charmc $(OPTS)
7 CHARMLIB=$(CHARMDIR)/lib
8
9
10 all: hello
11
12 hello: hello.o
13         $(CHARMC) -language charm++ -o hello hello.o  -module NodeHelper
14         $(CHARMC) -language charm++ -o hello.prj hello.o  -tracemode projections -module NodeHelper
15
16 hello.decl.h: hello.ci
17         $(CHARMC)  hello.ci
18
19 hello.o: hello.C hello.decl.h 
20         $(CHARMC) -c hello.C
21
22 clean:
23         rm -f *.decl.h *.def.h conv-host *.o hello hello.prj charmrun *.log *.sum *.sts
24
25 test: all
26         ./charmrun ./hello +p4 10
27
28 bgtest: all
29         ./charmrun ./hello +p4 10 +x2 +y2 +z2 +cth1 +wth1
30
31 module: $(CHARMLIB)/libmoduleNodeHelper.a
32
33 $(CHARMLIB)/libmoduleNodeHelper.a: NodeHelper.o
34         $(CHARMC)  -o $(CHARMLIB)/libmoduleNodeHelper.a NodeHelper.o
35
36
37 NodeHelper.decl.h: NodeHelper.ci
38         $(CHARMC)  NodeHelper.ci
39
40
41 NodeHelper.o: NodeHelper.C NodeHelper.decl.h
42         $(CHARMC) -c NodeHelper.C
43