updated CUDA hybridAPI and added a CUDA hello example
[charm.git] / src / arch / cuda / hybridAPI / Makefile
1 CHARMDIR=~/charm
2 CHARMC=$(CHARMDIR)/bin/charmc
3
4 NVCC = /usr/local/cuda/bin/nvcc
5 NVCC_FLAGS = -g -c -use_fast_math #-device-debug -deviceemu
6 NVCC_INC = -I/usr/local/cuda/include -I~/NVIDIA_CUDA_SDK/common/inc
7
8 RM = rm -f
9
10 all: libs
11         cp libcudahybridapi.a $(CHARMDIR)/lib
12
13 libs: libcudahybridapi.a
14
15 install: libcudahybridapi.a
16         cp libcudahybridapi.a $(CHARMDIR)/lib
17 #       cp hybridapi.o wrqueue.o $(CHARMDIR)/tmp
18
19 libcudahybridapi.a: hybridapi.o wrqueue.o
20         -rm $@
21         ar q $@ hybridapi.o wrqueue.o 
22
23 hybridapi.o: cuda-hybrid-api.cu cuda-hybrid-api.h
24         $(NVCC) $(NVCC_FLAGS) $(NVCC_INC) -o hybridapi.o cuda-hybrid-api.cu
25
26 wrqueue.o: wrqueue.cu wrqueue.h wr.h 
27         $(NVCC) $(NVCC_FLAGS) $(NVCC_INC) -o wrqueue.o wrqueue.cu 
28
29 clean:
30         rm -f *.o *.a