From 5d73f5c308f420a4055db885fa9b1becb9f515ed Mon Sep 17 00:00:00 2001 From: Adrian Stratulat Date: Thu, 26 Dec 2019 21:35:54 +0200 Subject: [PATCH] Makefile: create target folders before using them When installing to an "empty" filesystem (as is the case with fakeroots and attempting to create installable packages), the ${PREFIX}/usr and ${PREFIX}/lib directories need to be created (using "install -d"). Without the patch, if the filesystem is entirely empty, "libcsdr.so" gets installed as "/lib" and "nmux" is installed as "/bin". --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 4db95f1d..f5c0822c 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,9 @@ clean-vect: clean: clean-vect rm -f libcsdr.so.$(SOVERSION) csdr ddcd nmux *.o *.so install: all + install -d $(PREFIX)/lib install -m 0755 libcsdr.so.$(SOVERSION) $(PREFIX)/lib + install -d $(PREFIX)/bin install -m 0755 csdr $(PREFIX)/bin install -m 0755 csdr-fm $(PREFIX)/bin install -m 0755 nmux $(PREFIX)/bin