From 1d7e76e0af18bb124ac10ddea9b10c00d2532430 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 6 Apr 2020 07:32:55 +0200 Subject: [PATCH] build: Use install command for installing files In build chroots of some package managers, the libdir does not exist yet so we need to create it. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9398ac1..77ede20 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ KFVER=131 PREFIX ?= /usr/local LIBDIR ?= $(PREFIX)/lib +INSTALL ?= install + ifeq ($(shell uname -s),Darwin) SHARED_NAME := libkissfft.dylib SHARED_FLAGS := -Wl,-install_name,$(SHARED_NAME) @@ -17,7 +19,7 @@ all: gcc -shared $(SHARED_FLAGS) -o $(SHARED_NAME) kiss_fft.o install: all - cp $(SHARED_NAME) $(LIBDIR) + $(INSTALL) -Dt $(LIBDIR) $(SHARED_NAME) doc: @echo "Start by reading the README file. If you want to build and test lots of stuff, do a 'make testall'"