aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <msabate@suse.com>2023-12-08 21:57:52 +0100
committerMiquel Sabaté Solà <msabate@suse.com>2023-12-08 21:57:52 +0100
commit46103595c072651ade490c48c417f5d8d7ba9327 (patch)
tree92cc48e3e88e614618ea2cca3771c88674f92189 /Makefile
parent57fde0bb5184371da33b212de6731c6e6829349f (diff)
downloadaoc2023.nes-46103595c072651ade490c48c417f5d8d7ba9327.tar.gz
aoc2023.nes-46103595c072651ade490c48c417f5d8d7ba9327.zip
Added a test suite
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 37723c5..0784337 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,8 @@
CC65 ?= cl65
CCOPTS ?= --target nes
+ifeq "$(DEBUG)" "1"
+CCOPTS += -g -Ln out/labels.txt
+endif
QUIET = @echo ' ' CC65 $@;
SOURCES = $(shell find src/ -type f -name '*.s' -printf "%f\n")
@@ -10,6 +13,7 @@ all: clean deps build
.PHONY: clean
clean:
+ @sed -i 's/RUN_TESTS = 1/RUN_TESTS = 0/g' test/defines.s
@rm -rf out
@mkdir out
@find . -type f -name "*.o" -delete
@@ -24,3 +28,7 @@ build: $(ROMS)
out/%.nes: src/%.s
$(QUIET) $(CC65) $(CCOPTS) $< -o $@
+
+.PHONY: test
+test:
+ @bash test/run.sh