From: Stephen Seo Date: Sun, 1 Sep 2024 03:36:04 +0000 (+0900) Subject: Update Makefile: recompile if header has changed X-Git-Tag: 1.0~94 X-Git-Url: https://git.seodisparate.com/stephenseo/search/main.js?a=commitdiff_plain;h=1811f65a13fa5a9fe9db9a2d89ab277ede4f32de;p=c_simple_http Update Makefile: recompile if header has changed --- diff --git a/Makefile b/Makefile index 14bfcd6..5377b7a 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,16 @@ else CFLAGS = ${COMMON_FLAGS} ${DEBUG_FLAGS} endif +HEADERS = \ + src/arg_parse.h \ + src/big_endian.h \ + src/tcp_socket.h \ + src/globals.h \ + src/signal_handling.h \ + src/constants.h \ + src/http.h \ + src/config.h + SOURCES = \ src/main.c \ src/arg_parse.c \ @@ -42,6 +52,6 @@ clean: rm -f unit_test rm -rf ${OBJECT_DIR} -${OBJECT_DIR}/%.c.o: %.c +${OBJECT_DIR}/%.c.o: %.c ${HEADERS} @mkdir -p $(dir $@) gcc -o $@ -c ${CFLAGS} $<