Skip to content
Snippets Groups Projects
Select Git revision
  • add-clFFT_GetSize
  • add-dylib-target
  • counting-mallocs
  • master default protected
  • remove-CPU-constraint
  • Add-PKGBUILD
  • HSA
  • clmathfft
  • longer_dft_support
  • current_fgrp_apps
  • current_brp_apps
11 results

Makefile

Blame
  • Forked from einsteinathome / libclfft
    4 commits behind the upstream repository.
    Makefile 921 B
    PWD = $(shell pwd)
    NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
    AMDAPPSDKROOT ?= /opt/AMDAPP
    CXX ?= g++
    
    TARGET = clfft_example
    
    ifndef OPENCL_INCLUDE
    ifdef CUDA_INSTALL_PATH
    OPENCL_INCLUDE = $(CUDA_INSTALL_PATH)/include
    endif
    ifdef OPENCL_INSTALL_PATH
    OPENCL_INCLUDE = $(OPENCL_INSTALL_PATH)/include
    endif
    endif
    ifndef OPENCL_INCLUDE
    OPENCL_INCLUDE = $(AMDAPPSDKROOT)/include -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc
    endif
    
    CXXFLAGS += -O3 -Wall -g -I$(OPENCL_INCLUDE) -I../include -fPIC
    LDFLAGS += $(PWD)/../lib/libclfft.a
    
    OS = $(shell uname -s)
    ARCH = $(shell uname -m)
    ifneq ($(ARCH), x86_64)
            ARCH = x86
    endif
    ifeq ($(OS), Darwin)
    	LDFLAGS += -framework OpenCL
    	LDFLAGS += -framework Accelerate
    else
    	LDFLAGS += -L$(AMDAPPSDKROOT)/lib/$(ARCH)
    	LDFLAGS += -lOpenCL
    endif
    
    
    $(TARGET): main.cpp Makefile $(PWD)/../lib/libclfft.a
    	$(CXX) $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
    
    clean:
    	rm -f $(TARGET)