Files
cse-130-http-server/Makefile
T
2026-05-24 23:24:25 -07:00

23 lines
441 B
Makefile

CC=gcc
CFLAGS=-Wall -Wextra -Wpedantic -std=c23 -D_POSIX_C_SOURCE=200112L -O2
CFLAGS+=-Og -g -fsanitize=address,undefined
SRCS=main.c threadpool.c util.c
OBJS=$(SRCS:%.c=bin/%.o)
all: httpserver
httpserver: $(OBJS)
$(CC) $(CFLAGS) -o $@ $^
bin/%.o: src/%.c
@mkdir -p bin/deps/
$(CC) $(CFLAGS) -MD -MF $(patsubst src/%.c,bin/deps/%.d,$^) -c -o $@ $^
include $(SRCS:%.c/bin/deps/%.d)
clean:
rm -rf bin/ httpserver
.PHONY: all clean