Handlers in another function

This commit is contained in:
Senad Uka
2022-11-19 23:18:44 +01:00
parent faebd267ca
commit ee1eb89e9a
6 changed files with 77 additions and 44 deletions

View File

@@ -5,13 +5,18 @@
CC = gcc
CFLAGS = -Wall -g -O2
LDFLAGS = -lmicrohttpd
OBJFILES = main.o handlers.o
DEPS = handlers.h
all: nasuh-server
nasuh-server: main.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
nasuh-server: $(OBJFILES)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)
clean:
rm -f nasuh-server
rm -f nasuh-server *.o
# end of Makefile