summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..48baef2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+CFLAGS = -Wall -Wextra -pedantic -O2
+prefix = /usr/local
+
+all: bin/host
+
+bin/%: src/%.c
+ $(CC) $(CFLAGS) -o $@ $<
+
+install: bin/host
+ mkdir -p $(prefix)/bin
+ cp bin/host $(prefix)/bin/host
+ chmod 755 $(prefix)/bin/host
+
+uninstall:
+ rm -f $(prefix)/bin/host
+
+clean:
+ rm -f bin/host
+
+.PHONY: all install uninstall clean