diff options
author | Mattias Andrée <maandree@kth.se> | 2018-08-29 18:41:58 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-08-29 18:42:41 +0200 |
commit | d8fde23bf25074d7f812b956d21cdcc36a348c28 (patch) | |
tree | 1fd09cf4e8427e161f24dff3e29194c5db060511 /Makefile | |
parent | Circumvent optimisation bug in clang, and fix bug in have_custom_malloc (diff) | |
download | libsimple-d8fde23bf25074d7f812b956d21cdcc36a348c28.tar.gz libsimple-d8fde23bf25074d7f812b956d21cdcc36a348c28.tar.bz2 libsimple-d8fde23bf25074d7f812b956d21cdcc36a348c28.tar.xz |
Makefile: add install and uninstall rules1.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -77,10 +77,22 @@ libsimple.a: $(OBJ) check: $(TESTS) @set -e; for t in $(TESTS); do printf '%s\n' "./$$t"; $(CHECK_PREFIX) "./$$t"; done +install: libsimple.a + mkdir -p -- "$(DESTDIR)$(PREFIX)/lib" + mkdir -p -- "$(DESTDIR)$(PREFIX)/include" + cp -- libsimple.a "$(DESTDIR)$(PREFIX)/lib" + cp -- libsimple.h "$(DESTDIR)$(PREFIX)/include" + cp -- libsimple-arg.h "$(DESTDIR)$(PREFIX)/include" + +uninstall: + -rm -f -- "$(DESTDIR)$(PREFIX)/lib/libsimple.a" + -rm -f -- "$(DESTDIR)$(PREFIX)/include/libsimple.h" + -rm -f -- "$(DESTDIR)$(PREFIX)/include/libsimple-arg.h" + clean: -rm -rf -- *.o *.su *.a *.so *.so.* *.gch *.gcda *.gcno *.gcov *.lo *.test .SUFFIXES: .SUFFIXES: .test .test.o .o .c -.PHONY: all check clean +.PHONY: all check install uninstall clean |