Commit 6051f04e authored by Oliver Bock's avatar Oliver Bock
Browse files

Added Makefiles for Win32 cross-compilation on Linux (using MinGW)

parent faf03ec9
PWD = $(shell pwd)
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
ATISTREAMSDKROOT ?= /usr/local/ati
TARGET = clfft_example.exe
CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(ATISTREAMSDKROOT)/include -I../include -D_WIN32_WINDOWS=0x0410 -malign-double
LDFLAGS += $(PWD)/../lib/libclfft.a ../lib/amd/win32/2.3/OpenCL.lib
$(TARGET): main.cpp Makefile $(PWD)/../lib/libclfft.a
i586-mingw32msvc-g++ $(CXXFLAGS) main.cpp $(LDFLAGS) -o $(TARGET)
rm -f $(TARGET)
NVIDIA_SDK_INSTALL_PATH ?= /usr/local/cuda
ATISTREAMSDKROOT ?= /usr/local/ati
TARGET = libclfft.a
CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(ATISTREAMSDKROOT)/include -I../include
OBJECTS = fft_setup.o fft_execute.o fft_kernelstring.o
i586-mingw32msvc-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
fft_execute.o: fft_execute.cpp ../include/clFFT.h fft_internal.h
i586-mingw32msvc-g++ $(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
rm -f *.o
rm -f *.a
Supports Markdown
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