aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-05-31 23:22:36 +0000
committerla-ninpre <leobrekalini@gmail.com>2021-05-31 23:22:36 +0000
commit57f683f181495b802761d23e36b6d7ff75863613 (patch)
treea0a8777e21cdce16a6e10d49a8e6440bd38f7518 /Makefile
parentcc2975038177e2738ea9d75100d534a0296fa260 (diff)
downloadnimisewi_c-0.0.1.tar.gz
nimisewi_c-0.0.1.zip
added initial filesv0.0.1
FossilOrigin-Name: ec9a2c52b6452b8e2ad9d1e6e692c3288c28c0dde71fb72371885b7750ce08c8
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/
+