aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-22 10:10:10 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-22 10:10:10 +0100
commit0ae6230bdea9e6a98047ce4a8675b2813d7d904c (patch)
tree39e3b36dcd586f23863fa8c4524648701fe77e23
parentuse namespacing (diff)
downloadlibpassphrase-0ae6230bdea9e6a98047ce4a8675b2813d7d904c.tar.gz
libpassphrase-0ae6230bdea9e6a98047ce4a8675b2813d7d904c.tar.bz2
libpassphrase-0ae6230bdea9e6a98047ce4a8675b2813d7d904c.tar.xz
add install and uninstall to makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 87ce435..7618511 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,7 @@
+PREFIX = /usr
+LIB = /lib
+INCLUDE = /include
+
OPTIMISE = -Os
CPPFLAGS =
CFLAGS = -std=c90 -Wall -Wextra -fPIC
@@ -23,6 +27,20 @@ obj/%.o: src/%.c src/%.h
$(CC) $(CC_FLAGS) -o "$@" -c "$<"
+.PHONY: install
+install: bin/libpassphrase.so
+ install -dm755 -- "$(DESTDIR)$(PREFIX)$(LIB)"
+ install -dm755 -- "$(DESTDIR)$(PREFIX)$(INCLUDE)"
+ install -m755 -- bin/libpassphrase.so "$(DESTDIR)$(PREFIX)$(LIB)"
+ install -m755 -- src/passphrase.h "$(DESTDIR)$(PREFIX)$(INCLUDE)"
+
+
+.PHONY: uninstall
+uninstall:
+ -rm -- "$(DESTDIR)$(PREFIX)$(LIB)/libpassphrase.so"
+ -rm -- "$(DESTDIR)$(PREFIX)$(INCLUDE)/passphrase.h"
+
+
.PHONY: clean
clean:
-rm -r bin obj