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

6
7
TARGET = clfft_example

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

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


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

clean:
	rm -f $(TARGET)