aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1cabe1f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+PREFIX ?= /usr/local/
+CFLAGS += -pedantic -Wall -Wextra -Wmissing-prototypes \
+ -Wstrict-prototypes -Wwrite-strings
+
+NIMITOKI = nimitoki.c nimitoki.h
+
+.SUFFIXES: .c .o
+
+.c.o:
+ ${CC} ${CFLAGS} -c $<
+
+all: nimitoki.o nimisewi
+
+nimitoki.o: ${NIMITOKI}
+
+${NIMITOKI}: makenimitoki
+ ./makenimitoki nimitoki.txt
+
+makenimitoki: makenimitoki.o
+ ${CC} ${CFLAGS} -o $@ makenimitoki.o
+
+nimisewi: nimisewi.o nimitoki.o
+ ${CC} ${CFLAGS} -o $@ nimisewi.o nimitoki.o
+
+clean:
+ find . \( -name "*.o" -o -name nimisewi -o -name makenimitoki \) -delete
+
+distclean:
+ find . \( -name "*.o" \
+ -o -name nimisewi \
+ -o -name makenimitoki \
+ -o -name nimitoki.c \
+ -o -name nimitoki.h \) -delete
+
+install: nimisewi
+ install -o root -g wheel nimisewi ${PREFIX}/bin/
+