Makefile 653 Bytes
Newer Older
1
2
PWD = $(shell pwd)
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
3
AMDAPPSDKROOT ?= /opt/AMDAPP
4

5
6
TARGET = clfft_example

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

OS = $(shell uname -s)
11
ARCH = $(shell uname -m)
Oliver Bock's avatar
Oliver Bock committed
12
13
14
ifneq ($(ARCH), x86_64)
        ARCH = x86
endif
15
16
ifeq ($(OS), Darwin)
	LDFLAGS += -framework OpenCL
17
	LDFLAGS += -framework Accelerate
18
else
19
	LDFLAGS += -L$(AMDAPPSDKROOT)/lib/$(ARCH)
20
	LDFLAGS += -lOpenCL
21
22
23
endif


24
$(TARGET): main.cpp Makefile $(PWD)/../lib/libclfft.a
25
	g++ $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
26
27
28

clean:
	rm -f $(TARGET)