From a41df19413f8e1b45b25fc4bd6a4434ad38be057 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 19 Apr 2022 15:42:34 -0400 Subject: Makefile: Move .flags to build/FLAGS --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a6e7363..acc5cbf 100644 --- a/Makefile +++ b/Makefile @@ -235,18 +235,18 @@ $(BIN_GOALS): build build/tests: $(MKDIR) $@ -build/%.o: src/%.c .flags | build +build/%.o: src/%.c build/FLAGS $(CC) $(ALL_CFLAGS) -c $< -o $@ -build/tests/%.o: tests/%.c .flags | build/tests +build/tests/%.o: tests/%.c build/FLAGS | build/tests $(CC) $(ALL_CFLAGS) -c $< -o $@ # Save the full set of flags to rebuild everything when they change -.flags: FORCE - @./flags.sh $(CC) : $(ALL_CFLAGS) : $(ALL_LDFLAGS) : $(ALL_LDLIBS) +build/FLAGS: FORCE | build + @./flags.sh $@ $(CC) : $(ALL_CFLAGS) : $(ALL_LDFLAGS) : $(ALL_LDLIBS) .PHONY: FORCE -# Make sure that "make release" builds everything, but "make release main.o" doesn't +# Make sure that "make release" builds everything, but "make release build/main.o" doesn't $(FLAG_GOALS): $(FLAG_PREREQS) @: .PHONY: $(FLAG_GOALS) @@ -273,7 +273,7 @@ endif .PHONY: distcheck clean: - $(RM) -r bfs .flags build + $(RM) -r bfs build .PHONY: clean install: -- cgit v1.2.3