From 075cbd2b88d2ef613388f555c77046f15a70999d Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:11:53 +0200 Subject: [PATCH] makefile destdir --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 02ccb68..710cc3a 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +DESTDIR=/usr + all: make -C ./lib/pclsync fs cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -H./lib/mbedtls-2.1.14 -B./lib/mbedtls-2.1.14/build @@ -12,9 +14,10 @@ clean: rm -rf ./cmd/pcloudcc/build install: - install -m 755 cmd/pcloudcc/build/pcloudcc /usr/bin/pcloudcc - install -m 755 cmd/pcloudcc/build/libpcloudcc_lib.so /usr/lib/libpcloudcc_lib.so + install -d $(DESTDIR)/{bin,lib} + install -m 755 cmd/pcloudcc/build/pcloudcc $(DESTDIR)/bin/pcloudcc + install -m 755 cmd/pcloudcc/build/libpcloudcc_lib.so $(DESTDIR)/lib/libpcloudcc_lib.so uninstall: - rm -f /usr/bin/pcloudcc - rm -f /usr/lib/libpcloudcc_lib.so + rm -f $(DESTDIR)/bin/pcloudcc + rm -f $(DESTDIR)/lib/libpcloudcc_lib.so