summary refs log tree commit diff
path: root/bin/edi/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'bin/edi/Makefile')
-rw-r--r--bin/edi/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/edi/Makefile b/bin/edi/Makefile
new file mode 100644
index 00000000..2d9128c0
--- /dev/null
+++ b/bin/edi/Makefile
@@ -0,0 +1,30 @@
+CFLAGS += -Wall -Wextra -Wpedantic
+LDLIBS = -lcursesw
+
+OBJS += buffer.o
+OBJS += log.o
+OBJS += table.o
+
+TESTS += buffer.t
+TESTS += table.t
+
+all: tags edi test
+
+tags: *.h *.c
+	ctags -w *.h *.c
+
+edi: $(OBJS)
+	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@
+
+$(OBJS): edi.h
+
+test: $(TESTS)
+	set -e; $(TESTS:%=./%;)
+
+.SUFFIXES: .t
+
+.c.t:
+	$(CC) $(CFLAGS) -DTEST $(LDFLAGS) $< $(LDLIBS) -o $@
+
+clean:
+	rm -f tags edi $(OBJS) $(TESTS)