updated CUDA hybridAPI and added a CUDA hello example
[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 -I../../../../../NVIDIA_CUDA_SDK/common/inc
8
9 LDLIBS += -lcuda -lcudart -lGL -lGLU -lcutil
10
11 export LD_RUN_PATH = /usr/local/cuda/lib
12
13 all: hello
14
15 hello: $(OBJS)
16         $(CHARMC) -language charm++ -o hello $(OBJS) $(LD_LIBS)
17
18 hello.decl.h: hello.ci
19         $(CHARMC)  hello.ci
20
21 clean:
22         rm -f *.decl.h *.def.h conv-host *.o wr.h hello charmrun
23
24 hello.o: hello.C hello.decl.h
25         $(CHARMC) -g -c hello.C
26
27 helloCUDA.o: helloCUDA.cu
28         cp ../../../../src/arch/cuda/hybridAPI/wr.h .
29         $(NVCC) -g $(NVCC_FLAGS) $(NVCC_INC) helloCUDA.cu
30
31 test: all
32         ./charmrun hello +p4 10
33
34 bgtest: all
35         ./charmrun hello +p4 10 +x2 +y2 +z1