Finish initial implementation

This commit is contained in:
2026-05-25 17:25:50 -07:00
parent 92acec0893
commit 1005650ea6
10 changed files with 804 additions and 63 deletions
+5 -4
View File
@@ -1,7 +1,7 @@
CC=gcc
CFLAGS=-Wall -Wextra -Wpedantic -std=c23 -D_POSIX_C_SOURCE=200112L -O2
CFLAGS=-Wall -Wextra -Wpedantic -std=c23 -D_POSIX_C_SOURCE=200809L -pthread -O2
CFLAGS+=-Og -g -fsanitize=address,undefined
SRCS=main.c threadpool.c util.c
SRCS=main.c threadpool.c util.c server.c http.c
OBJS=$(SRCS:%.c=bin/%.o)
@@ -10,9 +10,10 @@ all: httpserver
httpserver: $(OBJS)
$(CC) $(CFLAGS) -o $@ $^
bin/%.o: src/%.c
# Auto-rebuild if Makefile changes
bin/%.o: src/%.c Makefile
@mkdir -p bin/deps/
$(CC) $(CFLAGS) -MD -MF $(patsubst src/%.c,bin/deps/%.d,$^) -c -o $@ $^
$(CC) $(CFLAGS) -MD -MF $(patsubst src/%.c,bin/deps/%.d,$<) -c -o $@ $<
include $(SRCS:%.c/bin/deps/%.d)