Commit 7439e79e authored by Bernd Machenschalk's avatar Bernd Machenschalk
Browse files

Merge branch 'master' into 'master'

add a shared library version

See merge request einsteinathome/libclfft!2
parents a7bd5410 ad6ba6d3
...@@ -4,8 +4,9 @@ CXX ?= g++ ...@@ -4,8 +4,9 @@ CXX ?= g++
AR ?= ar AR ?= ar
TARGET = libclfft.a TARGET = libclfft.a
TARGET2 = libclfft.so
CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(AMDAPPSDKROOT)/include -I../include CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(AMDAPPSDKROOT)/include -I../include -fPIC
OS = $(shell uname -s) OS = $(shell uname -s)
ifeq ($(OS), Darwin) ifeq ($(OS), Darwin)
CXXFLAGS += -I/System/Library/Frameworks CXXFLAGS += -I/System/Library/Frameworks
...@@ -17,8 +18,10 @@ PREFIX ?= "." ...@@ -17,8 +18,10 @@ PREFIX ?= "."
$(TARGET): $(OBJECTS) $(TARGET): $(OBJECTS)
$(AR) rcs $(TARGET) $(OBJECTS) $(AR) rcs $(TARGET) $(OBJECTS)
$(CXX) -shared -o $(TARGET2) $(OBJECTS)
mkdir -p ../lib mkdir -p ../lib
cp $(TARGET) ../lib/ cp $(TARGET) ../lib/
cp $(TARGET2) ../lib/
fft_setup.o: fft_setup.cpp fft_internal.h fft_base_kernels.h fft_setup.o: fft_setup.cpp fft_internal.h fft_base_kernels.h
$(CXX) $(CXXFLAGS) -c fft_setup.cpp $(CXX) $(CXXFLAGS) -c fft_setup.cpp
...@@ -33,6 +36,7 @@ install: $(TARGET) ../include/clFFT.h ...@@ -33,6 +36,7 @@ install: $(TARGET) ../include/clFFT.h
mkdir -p $(PREFIX)/lib $(PREFIX)/include mkdir -p $(PREFIX)/lib $(PREFIX)/include
cp ../include/clFFT.h $(PREFIX)/include/eclfft.h cp ../include/clFFT.h $(PREFIX)/include/eclfft.h
cp $(TARGET) $(PREFIX)/lib/libeclfft.a cp $(TARGET) $(PREFIX)/lib/libeclfft.a
cp $(TARGET2) $(PREFIX)/lib/libeclfft.so
clean: clean:
rm -f *.o 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