From 434038dbdd2376435c6f67e4be4c360e19d5626e Mon Sep 17 00:00:00 2001
From: Oliver Bock <oliver.bock@aei.mpg.de>
Date: Thu, 3 Mar 2011 15:01:14 +0100
Subject: [PATCH] Added missing pieces for Linux/NVIDIA build

---
 example/Makefile | 9 +++++++--
 src/Makefile     | 6 ++++--
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/example/Makefile b/example/Makefile
index 4908b2b..e6bfe85 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 88a4d13..9e50bcc 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
-- 
GitLab