From 4193457bf4d2f8191203a0c179afaff40b3776ff Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 6 Apr 2020 05:55:54 +0200 Subject: [PATCH] build: Make installation prefix configurable Nix uses different prefix so we need it configurable. --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ea0b60e..271e5e4 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ KFVER=131 +PREFIX ?= /usr/local +LIBDIR ?= $(PREFIX)/lib + ifeq ($(shell uname -s),Darwin) SHARED := -Wl,-install_name,libkissfft.dylib -o libkissfft.dylib else @@ -12,7 +15,7 @@ all: gcc -shared $(SHARED) kiss_fft.o install: all - cp libkissfft.so /usr/local/lib/ + cp libkissfft.so $(LIBDIR) doc: @echo "Start by reading the README file. If you want to build and test lots of stuff, do a 'make testall'"