aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2025-10-11 02:30:18 -0400
committerJack Jamison <jackqjamison@gmail.com>2025-10-11 02:30:18 -0400
commitf43ec9b27ebe37b799709985f5587e29ec8ef88b (patch)
treecfae61b2e1ffc3658bdf67450666f5f0c89b2b92 /Makefile
parentba3a68a4f73f6653b1e1b095abc08234dedc504d (diff)
refactor to .h files
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 98e3784..24e62bb 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ WLC=$(patsubst %.xml,$(OBJDIR)/%.c, $(WLPROT))
WLH=$(patsubst %.xml,$(OBJDIR)/%.h, $(WLPROT))
SRC=$(WLC) $(wildcard *.c) $(wildcard glad/*.c)
OBJ=$(patsubst %.c,$(OBJDIR)/%.o, $(notdir $(SRC)))
+HDEPS=state.h wayland.h
.SILENT: $(OBJ) $(WLC) $(WLH) $(BIN) $(OBJDIR) compile_flags
@@ -22,15 +23,15 @@ $(BIN): $(OBJ)
printf " LD %s\n" $@
$(CC) $(LDFLAGS) $^ -o $@
-$(OBJDIR)/%.o: %.c %.h state.h
+$(OBJDIR)/%.o: %.c %.h $(HDEPS)
printf " CC %s\n" $@
$(CC) $(CFLAGS) -c $< -o $@
-$(OBJDIR)/%.o: */%.c */%.h state.h
+$(OBJDIR)/%.o: */%.c */%.h $(HDEPS)
printf " CC %s\n" $@
$(CC) $(CFLAGS) -c $< -o $@
-$(OBJDIR)/%.o: %.c state.h
+$(OBJDIR)/%.o: %.c $(HDEPS)
printf " CC %s\n" $@
$(CC) $(CFLAGS) -c $< -o $@