Fix Makefile rules so that test.elf builds in build/test (#6004)

This commit is contained in:
Martin Griffin 2025-01-11 14:29:51 +00:00 committed by GitHub
parent 8f34c76395
commit 7f2b76d597
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)