Modified CUDA hello example to use current version of GPU Manager.
[charm.git] / examples / charm++ / cuda / hello / Makefile
1 CHARMC=../../../../bin/charmc $(OPTS)
2
3 OBJS = hello.o helloCUDA.o
4
5 NVCC = /usr/local/cuda/bin/nvcc 
6 NVCC_FLAGS = -c -use_fast_math #-device-debug -deviceemu 
7 NVCC_INC = -I/usr/local/cuda/include 
8 CHARMINC = -I../../../../include
9 LD_LIBS += -lcuda -lcudart 
10
11 all: hello
12
13 hello: $(OBJS)
14         $(CHARMC) -language charm++ -o hello $(OBJS) $(LD_LIBS)
15
16 hello.decl.h: hello.ci
17         $(CHARMC)  hello.ci
18
19 clean:
20         rm -f *.decl.h *.def.h conv-host *.o hello charmrun
21
22 hello.o: hello.C hello.decl.h
23         $(CHARMC) -c hello.C
24
25 helloCUDA.o: helloCUDA.cu
26         $(NVCC) $(NVCC_FLAGS) $(NVCC_INC) $(CHARMINC) helloCUDA.cu
27
28 test: all
29         ./charmrun hello +p4 10
30
31 bgtest: all
32         ./charmrun hello +p4 10 +x2 +y2 +z1