Commit 214ec2d8 authored by Oliver Bock's avatar Oliver Bock
Browse files

Allow overriding of default build tools

parent 9a1e9f83
PWD = $(shell pwd)
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
AMDAPPSDKROOT ?= /opt/AMDAPP
CXX ?= g++
TARGET = clfft_example
......@@ -22,7 +23,7 @@ endif
$(TARGET): main.cpp Makefile $(PWD)/../lib/libclfft.a
g++ $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
$(CXX) $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
clean:
rm -f $(TARGET)
PWD = $(shell pwd)
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
AMDAPPSDKROOT ?= /opt/AMDAPP
CXX ?= i586-mingw32msvc-g++
TARGET = clfft_example.exe
......@@ -8,7 +9,7 @@ CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(AMDA
LDFLAGS += $(PWD)/../lib/libclfft.a ../lib/amd/win32/2.5/OpenCL.lib
$(TARGET): main.cpp Makefile $(PWD)/../lib/libclfft.a
i586-mingw32msvc-g++ $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
$(CXX) $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
clean:
rm -f $(TARGET)
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
AMDAPPSDKROOT ?= /opt/AMDAPP
CXX ?= g++
AR ?= ar
TARGET = libclfft.a
......@@ -13,18 +15,18 @@ OBJECTS = fft_setup.o fft_execute.o fft_kernelstring.o
$(TARGET): $(OBJECTS)
ar rcs $(TARGET) $(OBJECTS)
$(AR) rcs $(TARGET) $(OBJECTS)
mkdir -p ../lib
cp $(TARGET) ../lib/
fft_setup.o: fft_setup.cpp fft_internal.h fft_base_kernels.h
g++ $(CXXFLAGS) -c fft_setup.cpp
$(CXX) $(CXXFLAGS) -c fft_setup.cpp
fft_execute.o: fft_execute.cpp ../include/clFFT.h fft_internal.h
g++ $(CXXFLAGS) -c fft_execute.cpp
$(CXX) $(CXXFLAGS) -c fft_execute.cpp
fft_kernelstring.o: fft_kernelstring.cpp ../include/clFFT.h fft_internal.h
g++ $(CXXFLAGS) -c fft_kernelstring.cpp
$(CXX) $(CXXFLAGS) -c fft_kernelstring.cpp
clean:
rm -f *.o
......
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
AMDAPPSDKROOT ?= /opt/AMDAPP
CXX ?= i586-mingw32msvc-g++
AR ?= i586-mingw32msvc-ar
TARGET = libclfft.a
......@@ -9,18 +11,18 @@ OBJECTS = fft_setup.o fft_execute.o fft_kernelstring.o
$(TARGET): $(OBJECTS)
i586-mingw32msvc-ar rcs $(TARGET) $(OBJECTS)
$(AR) rcs $(TARGET) $(OBJECTS)
mkdir -p ../lib
cp $(TARGET) ../lib/
fft_setup.o: fft_setup.cpp fft_internal.h fft_base_kernels.h
i586-mingw32msvc-g++ $(CXXFLAGS) -c fft_setup.cpp
$(CXX) $(CXXFLAGS) -c fft_setup.cpp
fft_execute.o: fft_execute.cpp ../include/clFFT.h fft_internal.h
i586-mingw32msvc-g++ $(CXXFLAGS) -c fft_execute.cpp
$(CXX) $(CXXFLAGS) -c fft_execute.cpp
fft_kernelstring.o: fft_kernelstring.cpp ../include/clFFT.h fft_internal.h
i586-mingw32msvc-g++ $(CXXFLAGS) -c fft_kernelstring.cpp
$(CXX) $(CXXFLAGS) -c fft_kernelstring.cpp
clean:
rm -f *.o
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment