mirror of
https://github.com/cc65/cc65.git
synced 2024-10-13 22:23:56 +00:00
31 lines
725 B
Makefile
31 lines
725 B
Makefile
|
|
||
|
# makefile for the assembler regression tests
|
||
|
|
||
|
BINDIR = ../../bin
|
||
|
#WORKDIR := ../../testwrk
|
||
|
WORKDIR := .
|
||
|
|
||
|
TARGETS = 6502 6502x 65sc02 65c02
|
||
|
#TARGETS += 65816
|
||
|
TARGETS += 4510
|
||
|
TARGETS += huc6280
|
||
|
#TARGETS += m740
|
||
|
|
||
|
all: $(addprefix $(WORKDIR)/, $(addsuffix -opcodes.bin, $(TARGETS)))
|
||
|
@#
|
||
|
|
||
|
.PHONY: $(addprefix $(WORKDIR)/, $(addsuffix -opcodes.bin, $(TARGETS)))
|
||
|
|
||
|
clean:
|
||
|
rm -f *.o *.bin *.lst
|
||
|
|
||
|
define build
|
||
|
$$(WORKDIR)/$(1)-opcodes.bin: $(1)-opcodes.s
|
||
|
@$$(BINDIR)/cl65 --cpu $(1) -t none -l $$(WORKDIR)/$(1)-opcodes.lst --obj-path $$(WORKDIR) -o $$@ $$<
|
||
|
@diff -q $(1)-opcodes.ref $$@ || (cat $$(WORKDIR)/$(1)-opcodes.lst ; exit 1)
|
||
|
@echo ca65 --cpu $(1) ok
|
||
|
endef
|
||
|
|
||
|
$(foreach target,$(TARGETS),$(eval $(call build,$(target))))
|
||
|
|