From d4e281a4775db459c271cb53c50847183846278f Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 5 Feb 2026 15:46:03 +0100 Subject: [PATCH] fix: makefile .PHONY directives were non-functional It appears that .PHONY, and all other special built-in target names should only be defined once, and should not be used as a "tag", as I have done here. --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9986679..81c4e6e 100644 --- a/Makefile +++ b/Makefile @@ -52,32 +52,32 @@ LDLIBS += -lopengl32 -lgdi32 $(warning Detected Windows_NT, please refer to the endif # Default target; compiles everything. -.PHONY: +PHONY = all all: bin/$(NAME) bin/stripped_$(NAME) # Install a binary on a POSIX-compliant system. -.PHONY: +PHONY += install install: bin/$(NAME) install -m0755 bin/$(NAME) $(DESTDIR)/bin/$(NAME) # Install a stripped binary on a POSIX-compliant system -.PHONY: +PHONY += install-strip install-strip: bin/$(NAME).stripped install -m0755 bin/stripped_$(NAME) $(DESTDIR)/bin/$(NAME) -.PHONY: +PHONY += uninstall uninstall: $(RM) $(DESTDIR)/bin/$(NAME) -.PHONY: +PHONY += check-sparse check-sparse: $(SRC) -$(Q)$(SPARSE) $(CFLAGS) $(CPPFLAGS) $(SRC) -.PHONY: +PHONY += check-gcc check-gcc: $(SRC) -$(Q)$(CC) -fanalyzer $(CFLAGS) $(CPPFLAGS) $(SRC) -.PHONY: +PHONY += clean clean: -$(Q)$(RM) $(OBJ) $(DEP) -$(Q)$(RM) -r bin/ @@ -105,3 +105,5 @@ bin/stripped_$(NAME): $(OBJ) | bin/ ifeq (0, $(words $(findstring $(MAKECMDGOALS), clean))) -include $(DEP) endif + +.PHONY: $(PHONY)