aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2018-02-08 20:01:10 +0100
committerTom Smeding <tom.smeding@gmail.com>2018-02-08 20:01:10 +0100
commitd345cc9cf52d52ff0046d0e4240aeb2268661b24 (patch)
tree758e7065f10d823676f800abfe8f8aa844e37f45
parent533777f424242d5da36228d5e874d53d4973cfa9 (diff)
Makefile cleanup
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 327282c..e3beecd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,20 @@
-.PHONY: all clean termio
+BIN=tetris
-all: tetris
+.PHONY: all clean install uninstall
+
+all: $(BIN)
clean:
- rm -f tetris
+ rm -f $(BIN)
+
+install: $(BIN)
+ install $(BIN) /usr/local/bin
-termio: termio/.git termio/libtermio.a
+uninstall: $(BIN)
+ rm -f /usr/local/bin/$(BIN)
-tetris: $(wildcard *.c *.h) termio termio/libtermio.a
+$(BIN): $(wildcard *.c *.h) termio/.git termio/libtermio.a
gcc -Wall -Wextra -std=c11 -O2 -fwrapv -o $@ $(filter %.c,$^) -Itermio termio/libtermio.a
termio/.git: