Makefile 557 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
else
15
	LDFLAGS += -L$(ATISTREAMSDKROOT)/lib/$(ARCH)
16
	LDFLAGS += -lOpenCL
17
18
19
endif


20
21
$(TARGET): main.cpp Makefile
	g++ $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
22
23
24

clean:
	rm -f $(TARGET)