# Have the following environment variable set:

# CUDA_SDK_PATH=/home/spoon/NVIDIA_GPU_Computing_SDK
#
# ... or whatever the equivalent paths are on your machine

MODELNAME := local_units

LIB := -lcblas
INCLUDES := 
USECUBLAS := 1

GENCODE_ARCH := -gencode=arch=compute_20,code=\"sm_20,compute_20\"
COMMONFLAGS :=

ifeq ($(exec), 1)
	EXECUTABLE	:= $(MODELNAME)
	COMMONFLAGS	+= -DEXEC
else
	EXECUTABLE	:= lib$(MODELNAME).so
endif

CUFILES				:= $(shell echo src/*.cu src/kernel/*.cu *.cu)
CU_DEPS				:= $(shell echo include/*.cuh include/kernel/*.cuh *.cuh)
CCFILES				:= $(shell echo src/*.cpp *.cpp)
C_DEPS				:= $(shell echo include/*.h *.h)

include common-gcc-cuda-3.2.mk
	
makedirectories:
	$(VERBOSE)mkdir -p $(LIBDIR)
	$(VERBOSE)mkdir -p $(OBJDIR)/src/kernel
	$(VERBOSE)mkdir -p $(TARGETDIR)
