summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohnny Richard <johnny@johnnyrichard.com>2022-04-12 03:33:59 +0200
committerJohnny Richard <johnny@johnnyrichard.com>2022-04-12 04:09:22 +0200
commit22283ef54b66495e2c88e0dbac9856c4a34434a6 (patch)
tree8f286885f00173b938213067776d34917e446386 /Makefile
parente83f1e89da0a8fb5527435a61743b9f0769caa7c (diff)
Add munit testing framework support
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index d9a3929..22d10a7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,25 @@
-CFLAGS=-DLOG_USE_COLOR
CC=gcc
.PHONY: all
-all: main.c server.c log.c
- $(CC) $(CFLAGS) -g -o papo main.c server.c log.c
+all: main.c server.o log.o hash_table.o
+ $(CC) -g -o papo main.c server.o log.o hash_table.o
.PHONY: test
-test: libpapo.so
- @python test.py -v --locals
+test: all
+ @make -C test
+
+.PHONY: ftest
+ftest: libpapo.so
+ @python ftest.py -v --locals
libpapo.so: server.o log.o
- $(CC) $(CFLAGS) -shared -o libpapo.so server.o log.o
+ $(CC) -shared -o libpapo.so server.o log.o
log.o: log.c
- $(CC) $(CFLAGS) -fPIC -c log.c
+ $(CC) -DLOG_USE_COLOR -fPIC -c log.c
.PHONY: clean
clean:
- rm *.o *.so
+ @$(RM) *.o
+ @$(RM) *.so
+ @$(RM) papo