From 6108b3a1c10d66f8c446ee54acdbe52efcfdf4e8 Mon Sep 17 00:00:00 2001 From: Johnny Richard Date: Sun, 10 Apr 2022 04:53:29 +0200 Subject: Add testing support --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c9b5be6..58bf569 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,20 @@ 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 + +.PHONY: test +test: libpapo.so + @python test.py + +libpapo.so: server.o log.o + $(CC) $(CFLAGS) -shared -o libpapo.so server.o log.o + +log.o: log.c + $(CC) $(CFLAGS) -fPIC -c log.c + +.PHONY: clean +clean: + rm *.o *.so -- cgit v1.2.3