| --- Makefile.orig 2019-02-01 15:57:58.000000000 +0300 |
| +++ Makefile 2019-05-30 12:13:11.283897400 +0300 |
| @@ -1,9 +1,19 @@ |
| KFVER=131 |
| |
| +PREFIX ?= /usr |
| +BINDIR = $(PREFIX)/bin |
| +INCLUDEDIR = $(PREFIX)/include |
| +LIBDIR = $(PREFIX)/lib |
| + |
| ifeq ($(shell uname -s),Darwin) |
| - SHARED := -Wl,-install_name,libkissfft.dylib -o libkissfft.dylib |
| + LIB_EXT = .dylib |
| + SHARED := -Wl,-install_name,libkissfft$(LIB_EXT) -o libkissfft$(LIB_EXT) |
| +else ifeq ($(findstring MINGW,$(shell uname -s)), MINGW) |
| + LIB_EXT = .dll |
| + SHARED := -o libkissfft$(LIB_EXT) -Wl,--out-implib,libkissfft.dll.a |
| else |
| - SHARED := -Wl,-soname,libkissfft.so -o libkissfft.so |
| + LIB_EXT = .so |
| + SHARED := -Wl,-soname,libkissfft$(LIB_EXT) -o libkissfft.so |
| endif |
| |
| all: |
| @@ -12,7 +22,10 @@ |
| gcc -shared $(SHARED) kiss_fft.o |
| |
| install: all |
| - cp libkissfft.so /usr/local/lib/ |
| + cp libkissfft$(LIB_EXT) $(DESTDIR)$(BINDIR)/ |
| + cp libkissfft.a $(DESTDIR)$(LIBDIR)/ |
| + cp libkissfft.dll.a $(DESTDIR)$(LIBDIR)/ |
| + cp kiss_fft.h $(DESTDIR)$(INCLUDEDIR)/ |
| |
| doc: |
| @echo "Start by reading the README file. If you want to build and test lots of stuff, do a 'make testall'" |