re-adding WORKDIR to Makefile
- added workaround to remove *.o files after assembling - also removed now obsolete clean target
This commit is contained in:
@@ -2,8 +2,7 @@
|
|||||||
# makefile for the assembler regression tests
|
# makefile for the assembler regression tests
|
||||||
|
|
||||||
BINDIR = ../../bin
|
BINDIR = ../../bin
|
||||||
#WORKDIR := ../../testwrk
|
WORKDIR := ../../testwrk
|
||||||
WORKDIR := .
|
|
||||||
|
|
||||||
BASE_TARGETS = 6502 6502x 65sc02 65c02
|
BASE_TARGETS = 6502 6502x 65sc02 65c02
|
||||||
BASE_TARGETS += 4510 huc6280
|
BASE_TARGETS += 4510 huc6280
|
||||||
@@ -18,21 +17,23 @@ all:
|
|||||||
|
|
||||||
# generate opcode targets and expand target list
|
# generate opcode targets and expand target list
|
||||||
define opcode
|
define opcode
|
||||||
OPCODE_TARGETLIST += $(1)-opcodes.bin
|
OPCODE_TARGETLIST += $$(WORKDIR)/$(1)-opcodes.bin
|
||||||
$$(WORKDIR)/$(1)-opcodes.bin: $(1)-opcodes.s
|
$$(WORKDIR)/$(1)-opcodes.bin: $(1)-opcodes.s
|
||||||
@$$(BINDIR)/cl65 --cpu $(1) -t none -l $$(WORKDIR)/$(1)-opcodes.lst --obj-path $$(WORKDIR) -o $$@ $$<
|
@$$(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)
|
@diff -q $(1)-opcodes.ref $$@ || (cat $$(WORKDIR)/$(1)-opcodes.lst ; exit 1)
|
||||||
@echo ca65 --cpu $(1) opcodes ok
|
@echo ca65 --cpu $(1) opcodes ok
|
||||||
|
@rm -f $(1)-opcodes.o #workaround for #168
|
||||||
endef
|
endef
|
||||||
$(foreach target,$(OPCODE_TARGETS),$(eval $(call opcode,$(target))))
|
$(foreach target,$(OPCODE_TARGETS),$(eval $(call opcode,$(target))))
|
||||||
|
|
||||||
# generate cpudetect targets and expand target list
|
# generate cpudetect targets and expand target list
|
||||||
define cpudetect
|
define cpudetect
|
||||||
CPUDETECT_TARGETLIST += $(1)-cpudetect.bin
|
CPUDETECT_TARGETLIST += $$(WORKDIR)/$(1)-cpudetect.bin
|
||||||
$$(WORKDIR)/$(1)-cpudetect.bin: cpudetect.s
|
$$(WORKDIR)/$(1)-cpudetect.bin: cpudetect.s
|
||||||
@$$(BINDIR)/cl65 --cpu $(1) -t none -l $$(WORKDIR)/$(1)-cpudetect.lst --obj-path $$(WORKDIR) -o $$@ $$<
|
@$$(BINDIR)/cl65 --cpu $(1) -t none -l $$(WORKDIR)/$(1)-cpudetect.lst --obj-path $$(WORKDIR) -o $$@ $$<
|
||||||
@diff -q $(1)-cpudetect.ref $$@ || (cat $$(WORKDIR)/$(1)-cpudetect.lst ; exit 1)
|
@diff -q $(1)-cpudetect.ref $$@ || (cat $$(WORKDIR)/$(1)-cpudetect.lst ; exit 1)
|
||||||
@echo ca65 --cpu $(1) cpudetect ok
|
@echo ca65 --cpu $(1) cpudetect ok
|
||||||
|
@rm -f cpudetect.o #workaround for #168
|
||||||
endef
|
endef
|
||||||
$(foreach target,$(CPUDETECT_TARGETS),$(eval $(call cpudetect,$(target))))
|
$(foreach target,$(CPUDETECT_TARGETS),$(eval $(call cpudetect,$(target))))
|
||||||
|
|
||||||
@@ -40,8 +41,5 @@ $(foreach target,$(CPUDETECT_TARGETS),$(eval $(call cpudetect,$(target))))
|
|||||||
all: $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
|
all: $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
|
||||||
@#
|
@#
|
||||||
|
|
||||||
clean:
|
.PHONY: all $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
|
||||||
rm -f *.o *.bin *.lst
|
|
||||||
|
|
||||||
.PHONY: all clean $(OPCODE_TARGETLIST) $(CPUDETECT_TARGETLIST)
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user