bunkum

an old and silly c99 web server with some fun features
Log | Files | Refs | README

Makefile (640B)


      1 CFLAGS?= -g -std=c99
      2 LIBS:=-lz -lpthread -lunwind -lunwind-ptrace -lunwind-generic
      3 CLIBS = $(wildcard utils/*.c) $(wildcard http/*.c)
      4 OBJ = $(wildcard build/*.o)
      5 
      6 .PHONY: all clean run test
      7 
      8 all: serv
      9 
     10 serv: $(CLIBS) http.c
     11 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -O3
     12 
     13 run: serv
     14 	sudo docker build -t bunkum-dev .
     15 	sudo docker run -it -p "8080:8082" bunkum-dev
     16 
     17 test: $(CLIBS) test.c
     18 	$(CC) $(CLIBS) testutils.c -shared -fPIC $(CFLAGS) -o libbunkum.so $(LIBS) -DTEST
     19 	$(CC) test.c -o test -ldl
     20 	./test libbunkum.so
     21 
     22 static:
     23 	$(CC) $(CLIBS) testutils.c -shared -fPIC $(CFLAGS) -o bunkum.o $(LIBS) -DTEST
     24 	ar rvs bunkum.a bunkum.o
     25 
     26 clean:
     27 	rm serv