diff options
author | Robin Krahl <me@robin-krahl.de> | 2018-03-18 19:18:10 +0100 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2018-03-18 19:18:10 +0100 |
commit | 195b68d5df33ee76488479e44bef60a78f0ce9fc (patch) | |
tree | 94d1cc450f408f930e231e02db802faf88be2377 | |
parent | fa1a10278f0a157ee2d47c8fd8cc7fc7c9f9f752 (diff) | |
download | midbro-195b68d5df33ee76488479e44bef60a78f0ce9fc.tar.gz midbro-195b68d5df33ee76488479e44bef60a78f0ce9fc.tar.bz2 |
Add install and uninstall target to Makefile
-rw-r--r-- | Makefile | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -7,6 +7,10 @@ DEBUG = SRC = midbro.c broevent.c fifoqueue.c OBJ = $(patsubst %.c, build/%.o, $(SRC)) +PREFIX = $(DESTDIR)/usr/local + +.PHONY: all dirs clean install uninstall lib/midbro bin/tests + all: dirs lib/midbro dirs: @@ -29,3 +33,13 @@ build/tests.o: test/tests.c clean: rm build/* bin/* + +install: lib/midbro + mkdir -p "$(PREFIX)/include" + mkdir -p "$(PREFIX)/lib" + cp -p include/midbro.h "$(PREFIX)/include/" + cp -p lib/libmidbro.so "$(PREFIX)/lib/" + +uninstall: + rm -f "$(PREFIX)/include/midbro.h" + rm -f "$(PREFIX)/lib/libmidbro.so" |