Makefile 616 Bytes
Newer Older
1
2
PWD = $(shell pwd)
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
3
ATISTREAMSDKROOT ?= /usr/local/ati
4

5
6
TARGET = clfft_example

7
CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(ATISTREAMSDKROOT)/include -I../include
8
LDFLAGS += $(PWD)/../lib/libclfft.a
9
10

OS = $(shell uname -s)
11
ARCH = $(shell uname -m)
12
13
ifeq ($(OS), Darwin)
	LDFLAGS += -framework OpenCL
14
	LDFLAGS += -framework Accelerate
15
else
16
	LDFLAGS += -L$(ATISTREAMSDKROOT)/lib/$(ARCH)
17
	LDFLAGS += -lOpenCL
18
19
20
endif


21
$(TARGET): main.cpp Makefile $(PWD)/../lib/libclfft.a
22
	g++ $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
23
24
25

clean:
	rm -f $(TARGET)