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

View File

@@ -1,4 +1,8 @@
# Run 'make SYS=<target>'; or, set a SYS env.
# var. to build for another target system.
SYS ?= geos-cbm
# Just the usual way to find out if we're
# using cmd.exe to execute make rules.
ifneq ($(shell echo),)
@@ -29,22 +33,31 @@ else
GRC := $(if $(wildcard ../../../bin/grc65*),../../../bin/grc65,grc65)
endif
samples: test.s vlir.cvt
EXELIST_geos-cbm = \
test.s \
vlir.cvt
ifneq ($(EXELIST_$(SYS)),)
samples: $(EXELIST_$(SYS))
else
samples:
@echo "warning: grc sample not available for" $(SYS)
endif
test.s: test.grc
$(GRC) -s test.s test.grc
vlir.cvt: vlir.grc vlir0.s vlir1.s vlir2.s
# using seperate calls here for demonstration purposes:
$(GRC) -t geos-cbm -s vlir.s vlir.grc
$(AS) -t geos-cbm vlir.s
$(AS) -t geos-cbm vlir0.s
$(AS) -t geos-cbm vlir1.s
$(AS) -t geos-cbm vlir2.s
$(LD) -t geos-cbm -o vlir.cvt vlir.o vlir0.o vlir1.o vlir2.o geos-cbm.lib
$(GRC) -t $(SYS) -s vlir.s vlir.grc
$(AS) -t $(SYS) vlir.s
$(AS) -t $(SYS) vlir0.s
$(AS) -t $(SYS) vlir1.s
$(AS) -t $(SYS) vlir2.s
$(LD) -t $(SYS) -o vlir.cvt vlir.o vlir0.o vlir1.o vlir2.o $(SYS).lib
# you can also do the above in one command:
# $(CL) -t geos-cbm -o vlir.cvt vlir.grc vlir0.s vlir1.s vlir2.s
# $(CL) -t $(SYS) -o vlir.cvt vlir.grc vlir0.s vlir1.s vlir2.s
clean:
@$(DEL) test.s test.h 2>$(NULLDEV)