summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0e7fec8..dada480 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CCOPTS = --std=gnu99 -Wall
+CCOPTS = --std=gnu99 -Wall -Werror -O2
.PHONY: src
all:
@@ -14,7 +14,7 @@ endif
adoc: validate
printf '<h1>%s</h1>\n' "$(shell head -n1 $(SRC))" > "$(DEST)"
- asciidoctor -s --safe \
+ asciidoc -s \
-a sectlinks \
-b html5 \
-o - "$(SRC)" >> "$(DEST)"
@@ -34,6 +34,12 @@ src:
cc $(CCOPTS) src/j2.c -c -o obj/j2.o
cc $(CCOPTS) src/main.c obj/*.o -o index
+test: src
+ if [ ! -d tests/obj ]; then mkdir tests/obj; fi
+ cc $(CCOPTS) tests/assert.c -c -o tests/obj/assert.o
+ cc $(CCOPTS) obj/*.o tests/obj/*.o tests/main.c -o tests/runtests
+ tests/runtests
+
clean:
if [ -d obj ]; then rm -r obj/*; fi
rm -f index

Generated by cgit