diff options
author | Mattias Andrée <maandree@kth.se> | 2016-09-30 12:47:37 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-09-30 12:47:37 +0200 |
commit | 2f7107e7d1eb6d808be6abd3234b3a8497501f0e (patch) | |
tree | cb586222b89debef740d2cde67fd7b45ccf111c7 | |
parent | add code (diff) | |
download | pdeath-2f7107e7d1eb6d808be6abd3234b3a8497501f0e.tar.gz pdeath-2f7107e7d1eb6d808be6abd3234b3a8497501f0e.tar.bz2 pdeath-2f7107e7d1eb6d808be6abd3234b3a8497501f0e.tar.xz |
Add makefile
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fc3e74c --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +PREFIX = /usr +BINDIR = $(PREFIX)/bin +DATADIR = $(PREFIX)/share +LICENSEDIR = $(DATADIR)/licences + +PKGNAME = pdeath +COMMAND = pdeath + +OPTIMISE = -O2 +WARN = -Wall -Wextra -pedantic + + +all: cmd + +cmd: bin/pdeath + +bin/pdeath: src/pdeath.c + @mkdir -p bin + $(CC) -std=c99 $(OPTIMISE) $(WARN) -o $@ $^ + +install: bin/pdeath + mkdir -p -- "$(DESTDIR)$(BINDIR)" + cp -- bin/pdeath "$(DESTDIR)$(BINDIR)/$(COMMAND)" + mkdir -p -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + cp -- LICENSE "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE" + +uninstall: + -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + +clean: + -rm -rf bin |