aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2021-04-24 16:36:08 -0400
committerGalen Guyer <galen@galenguyer.com>2021-04-24 16:36:08 -0400
commit1583d888ceca64dfabec602f6c1092cbbd814600 (patch)
tree53fab1bec794c2aaa119511d67ec34119f7b8295 /Makefile
parent48fd7ddd06dfd0db0c3a960c1144527bbe9dd7b4 (diff)
Add install and uninstall steps to makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 22 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 05b422b..beb6144 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
CC=gcc
-CFLAGS=-Wall -Wextra -pedantic -fstack-protector-all -pedantic -std=c99
+CFLAGS=-Wall -Wextra -Werror -fstack-protector-all -pedantic -std=c99
SANITY_FLAGS=-Wfloat-equal -Wshadow -Wpointer-arith
PREFIX ?= /usr
@@ -19,3 +19,24 @@ release: $(OUTPUT)
$(OUTPUT): Makefile $(SOURCE)
$(CC) $(CFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT)
+
+install: $(OUTPUT)
+ install -Dm755 "composer" "$(PREFIX)/bin/composer"
+ install -Dm644 "LICENSE" "$(PREFIX)/share/licenses/composer/LICENSE"
+ #install -Dm644 "composer.8" "$(PREFIX)/share/man/man8/composer.8.gz"
+
+uninstall:
+ rm -f "$(PREFIX)/bin/composer"
+ rm -f "$(PREFIX)/share/licenses/composer/LICENSE"
+ #rm -f "$(PREFIX)/share/man/man8/composer.8.gz"
+
+#composer: composer.c
+# gcc -ggdb -o $@ -std=c99 -Wall $<
+
+.PHONY:watch
+watch: composer
+ while true; do \
+ clear; \
+ (make composer && ./composer) || true; \
+ inotifywait -qe modify ./composer.c; \
+ done