dspsrc  := $(wildcard *.dsp)
cppsrc  := $(addprefix $(DEST), $(dspsrc:.dsp=.cpp))
appl 	:= $(addprefix $(DEST), $(dspsrc:.dsp=$(EXT)))

all :  $(appl)

NVCC := /usr/local/cuda/bin/nvcc

$(DEST)% : %.dsp
	faust $(VEC) $<  -a $(ARCH) -o $@.cpp
	$(NVCC) -m64 -gencode=arch=compute_10,code=\"sm_10,compute_10\"  -gencode=arch=compute_20,code=\"sm_20,compute_20\"  --compiler-options -fno-strict-aliasing -po maxrregcount=16 -I. -I/usr/local/cuda/include -I../../common/inc -I../../../shared//inc -DUNIX -O2 -c $@.cpp.cu -o  $@.cu.o
	llvm-g++ -O3 -I/opt/local -mfpmath=sse -msse -msse2 -msse3 -mmmx -m3dnow -ffast-math -ftree-vectorize  -I/usr/local/cuda/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS $(LIB) -L/usr/local/cuda/lib -lcudart $@.cpp $@.cu.o -o $@

clean :
	rm -f $(DEST)

