diff --git a/Makefile b/Makefile index beff62095fb9de10d28166eac6e020fde2d42266..512aedca6eb0bacea4e4ee0f2da4a8ef79cb9cba 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,9 @@ static: shared: $(MAKE) -C src shared +dylib: + $(MAKE) -C src dylib + sample: $(MAKE) -C example diff --git a/src/Makefile b/src/Makefile index fca56f0a95e5fce0b2932a8c199640133ed9a959..7e62f63c4ba9c75163366916b59311b84b1fbd73 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,6 +5,7 @@ AR ?= ar TARGET = libeclfft.a TARGET2 = libeclfft.so +TARGET3 = libeclfft.dylib ifndef OPENCL_INCLUDE ifdef CUDA_INSTALL_PATH @@ -35,6 +36,8 @@ static: $(TARGET) shared: $(TARGET2) +dylib: $(TARGET3) + $(TARGET): $(OBJECTS) $(AR) rcs $(TARGET) $(OBJECTS) mkdir -p ../lib @@ -43,6 +46,9 @@ $(TARGET): $(OBJECTS) $(TARGET2): $(OBJECTS) $(CXX) $(LDFLAGS) -shared -o $(TARGET2) $(OBJECTS) +$(TARGET3): $(OBJECTS) + $(CXX) $(LDFLAGS) -dynamiclib -o $(TARGET3) $(OBJECTS) + fft_setup.o: fft_setup.cpp fft_internal.h fft_base_kernels.h $(CXX) $(CXXFLAGS) -c fft_setup.cpp @@ -58,4 +64,4 @@ install: ../include/clFFT.h libeclfft.* cp libeclfft.* $(PREFIX)/lib/ clean: - rm -f *.o *.a *.so + rm -f *.o *.a *.so *.dylib