aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKikooDX <kikoodx@paranoici.org>2022-03-12 18:44:54 +0100
committerKikooDX <kikoodx@paranoici.org>2022-03-12 18:44:59 +0100
commitaac891a977028cc4b0bd135933f52f63232ecdef (patch)
tree93c4a974f22e2c4c1ff8da91c2681da45f597298
parent140bed1492c9fb1b18858aef4d68c5126337ed08 (diff)
downloadlzy-aac891a977028cc4b0bd135933f52f63232ecdef.tar.gz
rebuild when headers modified
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
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: