diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-08-09 01:09:06 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-08-09 01:09:06 +0200 |
commit | dc3e9e90cef882c326bb4fede69dd8b03fedfb76 (patch) | |
tree | c0240ad878385660c49892cc15524e4c973a22d5 /Makefile | |
parent | add deps (diff) | |
download | crt-calibrator-dc3e9e90cef882c326bb4fede69dd8b03fedfb76.tar.gz crt-calibrator-dc3e9e90cef882c326bb4fede69dd8b03fedfb76.tar.bz2 crt-calibrator-dc3e9e90cef882c326bb4fede69dd8b03fedfb76.tar.xz |
add install and uninstall rules to makefile
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -1,3 +1,14 @@ +PREFIX = /usr +BIN = /bin +DATA = /share +BINDIR = $(PREFIX)$(BIN) +DATADIR = $(PREFIX)$(DATA) +LICENSES = $(DATADIR)/licenses + +COMMAND = crt-calibrator +PKGNAME = crt-calibrator + + LIBS = libdrm FLAGS = -std=gnu99 -Og -g -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 \ @@ -33,6 +44,22 @@ obj/%.o: src/%.c src/*.h $(CC) $(C_FLAGS) -c -o $@ $< +.PHONY: install +install: bin/crt-calibrator + install -dm755 -- "$(DESTDIR)$(BINDIR)" + install -m755 bin/crt-calibrator -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + install -dm755 -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)" + install -m644 COPYING LICNSE -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)" + + +.PHONY: uninstall +uninstall: + -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + -rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/COPYING" + -rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/LICENSE" + -rmdir -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)" + + .PHONY: clean clean: -rm -r bin obj |