aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index dc0e08d..ac47448 100644
--- a/Makefile
+++ b/Makefile
@@ -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