From aac891a977028cc4b0bd135933f52f63232ecdef Mon Sep 17 00:00:00 2001 From: KikooDX Date: Sat, 12 Mar 2022 18:44:54 +0100 Subject: [PATCH] rebuild when headers modified --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9569eb2..66bca25 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ LDFLAGS = -lSDL2 -lSDL2_image -lSDL2_mixer $(shell sdl2-config --libs) OBJ_NAME = lzy OBJS := $(patsubst %.c,%.o,$(wildcard src/*.c)) +HEADERS := $(wildcard inc/*.h) all: $(OBJ_NAME) @@ -11,7 +12,7 @@ $(OBJ_NAME): $(OBJS) $(CC) $(LDFLAGS) $(LIBRARIES) -o $(OBJ_NAME) $(OBJS) strip $(OBJ_NAME) -%.o: %.c +%.o: %.c $(HEADERS) $(CC) $(CFLAGS) -c -o $@ $< cg: