Ported Makefile fix from upcoming (#6007)

Co-authored-by: Hedara <hedara90@gmail.com>
This commit is contained in:
hedara90 2025-01-11 21:53:15 +01:00 committed by GitHub
parent 8427d47ea5
commit 846734e894
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,9 +29,6 @@ endif
ifeq (debug,$(MAKECMDGOALS))
DEBUG := 1
endif
ifeq ($(TESTELF),$(MAKECMDGOALS))
TEST := 1
endif
# Default make rule
all: rom
@ -75,6 +72,9 @@ HEADLESSELF = $(ROM_NAME:.gba=-test-headless.elf)
# Pick our active variables
ROM := $(ROM_NAME)
ifeq ($(TESTELF),$(MAKECMDGOALS))
TEST := 1
endif
ifeq ($(TEST), 0)
OBJ_DIR := $(OBJ_DIR_NAME)
else
@ -83,9 +83,6 @@ endif
ifeq ($(DEBUG),1)
OBJ_DIR := $(OBJ_DIR_NAME_DEBUG)
endif
ifeq ($(TESTELF),$(MAKECMDGOALS))
TEST := 1
endif
ELF := $(ROM:.gba=.elf)
MAP := $(ROM:.gba=.map)
SYM := $(ROM:.gba=.sym)
@ -180,7 +177,7 @@ MAKEFLAGS += --no-print-directory
# Delete files that weren't built properly
.DELETE_ON_ERROR:
RULES_NO_SCAN += libagbsyscall clean clean-assets tidy tidymodern tidycheck generated clean-generated $(TESTELF)
RULES_NO_SCAN += libagbsyscall clean clean-assets tidy tidymodern tidycheck generated clean-generated
.PHONY: all rom agbcc modern compare check debug
.PHONY: $(RULES_NO_SCAN)