1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-22 01:16:54 +00:00

Added executable list for all targets and print a message when certain

samples are not available for a target (instead of failing). This makes
"make SYS=<target>" in samples recursively work for all supported targets.
This commit is contained in:
mrdudz
2021-05-15 19:48:19 +02:00
parent 18ae09f682
commit 86bd6b9add
4 changed files with 234 additions and 30 deletions
+47 -1
View File
@@ -31,10 +31,56 @@ else
LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65)
endif
samples: hello
EXELIST_atari2600 = \
notavailable
EXELIST_bbc = \
notavailable
EXELIST_creativision = \
notavailable
EXELIST_gamate = \
notavailable
EXELIST_geos-cbm = \
notavailable
EXELIST_geos-apple = \
notavailable
EXELIST_lunix = \
notavailable
EXELIST_lynx = \
notavailable
EXELIST_nes = \
notavailable
EXELIST_osic1p = \
notavailable
EXELIST_pce = \
notavailable
EXELIST_supervision = \
notavailable
# Unlisted targets will try to build everything.
# That lets us learn what they cannot build, and what settings
# we need to use for programs that can be built and run.
ifndef EXELIST_$(SYS)
EXELIST_$(SYS) := ${patsubst %.c,%,$(wildcard *.c)}
endif
samples: $(EXELIST_$(SYS))
hello: hello.c text.s
$(CL) -t $(SYS) -o hello hello.c text.s
# empty target used to skip systems that will not work with any program in this dir
notavailable:
@echo "warning: tutorial sample not available for" $(SYS)
clean:
@$(DEL) hello 2>$(NULLDEV)