diff --git a/example/Makefile b/example/Makefile index 4908b2b0ba8a8d9797688772c83abaa4583162e0..e6bfe85d04779a8b26ab11c3a45014008ef80580 100644 --- a/example/Makefile +++ b/example/Makefile @@ -1,11 +1,16 @@ +PWD = $(shell pwd) +NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda + TARGET = clfft_example -CXXFLAGS += -O3 -Wall -g -I../include -LDFLAGS += ../lib/libclfft.a +CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I../include +LDFLAGS += $(PWD)/../lib/libclfft.a OS = $(shell uname -s) ifeq ($(OS), Darwin) LDFLAGS += -framework OpenCL +else + LDFLAGS += -lOpenCL endif diff --git a/src/Makefile b/src/Makefile index 88a4d131f3bd3817f727febf64779f0396eb36ae..9e50bcc3a4f1cfd054cc3ac9a31778a56bedb69e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,6 +1,8 @@ +NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda + TARGET = libclfft.a -CXXFLAGS += -O3 -Wall -g -I../include +CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I../include OS = $(shell uname -s) ifeq ($(OS), Darwin) CXXFLAGS += -I/System/Library/Frameworks @@ -25,4 +27,4 @@ fft_kernelstring.o: fft_kernelstring.cpp ../include/clFFT.h fft_internal.h clean: rm -f *.o - rm -f *.a \ No newline at end of file + rm -f *.a