summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..73edfbc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+PREFIX ?= /usr/local
+BINDIR ?= /bin
+
+CFLAGS = -Wunused-variable -Wunused-function -Wconversion
+
+all: wd
+
+clean:
+ rm -f wd
+
+wd: wd.c
+ $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
+
+install:
+ install -d "$(DESTDIR)$(PREFIX)$(BINDIR)"
+ install -m755 wd -t "$(DESTDIR)$(PREFIX)$(BINDIR)"
+
+uninstall:
+ rm -f "$(DESTDIR)$(PREFIX)$(BINDIR)/wd"
+
+.PHONY: all install uninstall