mirror of
https://github.com/cc65/cc65.git
synced 2025-01-15 22:30:04 +00:00
commit
d066fbbcf5
15
.github/checks/Makefile
vendored
15
.github/checks/Makefile
vendored
@ -1,4 +1,17 @@
|
||||
|
||||
ifneq ($(shell echo),)
|
||||
CMD_EXE = 1
|
||||
endif
|
||||
|
||||
ifdef CMD_EXE
|
||||
|
||||
.PHONY: checkstyle
|
||||
|
||||
checkstyle:
|
||||
$(info INFO: style checks require bash.)
|
||||
|
||||
else
|
||||
|
||||
.PHONY: checkstyle lineendings tabs lastline spaces noexec
|
||||
|
||||
checkstyle: lineendings tabs lastline spaces noexec
|
||||
@ -17,3 +30,5 @@ spaces: spaces.sh
|
||||
|
||||
noexec: noexec.sh
|
||||
@./noexec.sh
|
||||
|
||||
endif
|
||||
|
@ -414,6 +414,7 @@ TARGETS := \
|
||||
|
||||
define TARGET_recipe
|
||||
|
||||
@echo making samples for: $(T)
|
||||
@$(MAKE) -j2 SYS:=$(T)
|
||||
@$(MAKE) --no-print-directory clean SYS:=$(T)
|
||||
|
||||
|
@ -761,6 +761,7 @@ TARGETS := \
|
||||
|
||||
define TARGET_recipe
|
||||
|
||||
@echo making targettest for: $(T)
|
||||
@$(MAKE) -j2 SYS:=$(T)
|
||||
@$(MAKE) --no-print-directory clean SYS:=$(T)
|
||||
|
||||
|
@ -73,4 +73,7 @@ endif
|
||||
dd if=$< bs=8K count=${COUNT} >> $@
|
||||
|
||||
clean:
|
||||
@$(DEL) conio.o conio.??? 2>$(NULLDEV)
|
||||
@$(DEL) conio.o 2>$(NULLDEV)
|
||||
@$(DEL) conio.pce 2>$(NULLDEV)
|
||||
@$(DEL) conio.bin 2>$(NULLDEV)
|
||||
@$(DEL) conio.map 2>$(NULLDEV)
|
||||
|
@ -5,25 +5,33 @@ ifneq ($(shell echo),)
|
||||
endif
|
||||
|
||||
ifdef CMD_EXE
|
||||
S = $(subst /,\,/)
|
||||
EXE = .exe
|
||||
MKDIR = mkdir $(subst /,\,$1)
|
||||
RMDIR = -rmdir /q /s $(subst /,\,$1)
|
||||
ERRDIR = 2>&1
|
||||
TRUE = exit 0
|
||||
CAT = type $(subst /,\,$1)
|
||||
else
|
||||
S = /
|
||||
EXE =
|
||||
MKDIR = mkdir -p $1
|
||||
RMDIR = $(RM) -r $1
|
||||
ERRDIR = 2>&1
|
||||
TRUE = true
|
||||
CAT = cat
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
# .SILENT:
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65)
|
||||
LD65 := $(if $(wildcard ../../../bin/ld65*),../../../bin/ld65,ld65)
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65)
|
||||
LD65 := $(if $(wildcard ../../../bin/ld65*),..$S..$S..$Sbin$Sld65,ld65)
|
||||
|
||||
WORKDIR = ../../../testwrk/asm/listing
|
||||
|
||||
ISEQUAL = ../../../testwrk/isequal$(EXE)
|
||||
ISEQUAL = ..$S..$S..$Stestwrk$Sisequal$(EXE)
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -O2
|
||||
@ -50,14 +58,14 @@ $(WORKDIR)/$1.bin: $1.s $(ISEQUAL)
|
||||
|
||||
# compile without generating listing
|
||||
ifeq ($(wildcard control/$1.err),)
|
||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2>&1
|
||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) $(ERRDIR)
|
||||
ifeq ($(wildcard control/$1.no-ld65),)
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2>&1
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) $(ERRDIR)
|
||||
endif
|
||||
else
|
||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2>&1 || true
|
||||
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) $(ERRDIR) || $(TRUE)
|
||||
ifeq ($(wildcard control/$1.no-ld65),)
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2>&1 || true
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) $(ERRDIR) || $(TRUE)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -71,14 +79,15 @@ ifneq ($(wildcard ref/$1.bin-ref),)
|
||||
$(ISEQUAL) --binary ref/$1.bin-ref $$@
|
||||
endif
|
||||
|
||||
# rem $(indfo $(CAT) $(subst /,$$S,$$$(@:.bin=.ld65-err)))
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err-ref),)
|
||||
@echo cat $$(@:.bin=.ld65-err)
|
||||
cat $$(@:.bin=.ld65-err)
|
||||
@echo
|
||||
@echo
|
||||
@echo $(CAT) $$(@:.bin=.ld65-err)
|
||||
# FIXME: somehow this refuses to work in cmd.exe
|
||||
ifndef CMD_EXE
|
||||
$(call CAT,$$(@:.bin=.ld65-err))
|
||||
-diff -u ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
|
||||
@echo
|
||||
@echo
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),)
|
||||
@ -88,14 +97,14 @@ endif
|
||||
|
||||
# compile with listing file
|
||||
ifeq ($(wildcard control/$1.err),)
|
||||
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1
|
||||
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) $(ERRDIR)
|
||||
ifeq ($(wildcard control/$1.no-ld65),)
|
||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2>&1
|
||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) $(ERRDIR)
|
||||
endif
|
||||
else
|
||||
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1 || true
|
||||
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) $(ERRDIR) || $(TRUE)
|
||||
ifeq ($(wildcard control/$1.no-ld65),)
|
||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2>&1 || true
|
||||
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) $(ERRDIR) || $(TRUE)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user