diff --git a/.github/workflows/build-on-pull-request.yml b/.github/workflows/build-on-pull-request.yml index b577e4b03..f5aacca31 100644 --- a/.github/workflows/build-on-pull-request.yml +++ b/.github/workflows/build-on-pull-request.yml @@ -29,29 +29,29 @@ jobs: run: make -j2 sorted - name: Build the tools. shell: bash - run: make -j2 bin USER_CFLAGS=-Werror + run: make -j2 bin USER_CFLAGS=-Werror QUIET=1 - name: Build the dbginfo example shell: bash - run: make -j2 -C src test + run: make -j2 -C src test QUIET=1 - name: Build the utilities. shell: bash - run: make -j2 util + run: make -j2 util QUIET=1 - name: Build the platform libraries. shell: bash run: make -j2 lib QUIET=1 - name: check test that no modules use sp shell: bash - run: make -j2 checksp QUIET=1 + run: make -j2 checksp QUIET=1 - name: Run the regression tests. shell: bash run: make -j2 test QUIET=1 - name: Test that the samples can be built. - run: make -C samples platforms + run: make -C samples platforms QUIET=1 - name: Test that the targettest programs can be built. - run: make -C targettest platforms + run: make -C targettest platforms QUIET=1 - name: Build the document files. shell: bash - run: make -j2 doc + run: make -j2 doc QUIET=1 - name: Upload a documents snapshot. uses: actions/upload-artifact@v4 with: @@ -59,8 +59,8 @@ jobs: path: ./html - name: Build 64-bit Windows versions of the tools. run: | - make -C src clean - make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32- + make -C src clean QUIET=1 + make -j2 bin QUIET=1 USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32- build_windows: name: Build and Test (Windows) @@ -90,7 +90,7 @@ jobs: - name: Build utils (MinGW) shell: cmd - run: make -j2 util SHELL=cmd + run: make -j2 util QUIET=1 SHELL=cmd - name: Build the platform libraries (make lib) shell: cmd diff --git a/.github/workflows/snapshot-on-push-master.yml b/.github/workflows/snapshot-on-push-master.yml index 557ba24af..591b221be 100644 --- a/.github/workflows/snapshot-on-push-master.yml +++ b/.github/workflows/snapshot-on-push-master.yml @@ -55,8 +55,8 @@ jobs: - name: Build the tools. shell: bash run: | - make -j2 bin USER_CFLAGS=-Werror - make -j2 util + make -j2 bin USER_CFLAGS=-Werror QUIET=1 + make -j2 util QUIET=1 - name: Build the platform libraries. shell: bash run: make -j2 lib QUIET=1 @@ -65,26 +65,26 @@ jobs: run: make -j2 test QUIET=1 - name: Test that the samples can be built. shell: bash - run: make -j2 samples + run: make -j2 samples QUIET=1 - name: Remove the output from the samples tests. shell: bash - run: make -C samples clean + run: make -C samples clean QUIET=1 - name: Remove programs in util directory shell: bash - run: make -C util clean + run: make -C util clean QUIET=1 - name: Build the document files. shell: bash - run: make -j2 doc + run: make -j2 doc QUIET=1 - name: Build and package 64-bit Windows versions of the tools. run: | - make -C src clean - make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32- + make -C src clean QUIET=1 + make -j2 bin QUIET=1 USER_CFLAGS=-Werror CROSS_COMPILE=x86_64-w64-mingw32- make zip mv cc65.zip cc65-snapshot-win64.zip - name: Build and package 32-bit Windows versions of the tools. run: | - make -C src clean - make -j2 bin USER_CFLAGS=-Werror CROSS_COMPILE=i686-w64-mingw32- + make -C src clean QUIET=1 + make -j2 bin USER_CFLAGS=-Werror QUIET=1 CROSS_COMPILE=i686-w64-mingw32- make zip mv cc65.zip cc65-snapshot-win32.zip diff --git a/.github/workflows/windows-test-scheduled.yml b/.github/workflows/windows-test-scheduled.yml index fa22473f4..2e24e1d01 100644 --- a/.github/workflows/windows-test-scheduled.yml +++ b/.github/workflows/windows-test-scheduled.yml @@ -60,19 +60,19 @@ jobs: - name: Build utils (MinGW) if: steps.check-sha.outputs.cache-hit != 'true' shell: cmd - run: make -j2 util SHELL=cmd + run: make -j2 util SHELL=cmd QUIET=1 - name: Build the platform libraries (make lib) if: steps.check-sha.outputs.cache-hit != 'true' shell: cmd - run: make -j2 lib QUIET=1 SHELL=cmd + run: make -j2 lib QUIET=1 SHELL=cmd QUIET=1 - name: Run the regression tests (make test) if: steps.check-sha.outputs.cache-hit != 'true' shell: cmd - run: make -j2 test QUIET=1 SHELL=cmd + run: make -j2 test QUIET=1 SHELL=cmd QUIET=1 - name: Test that the samples can be built (make samples) if: steps.check-sha.outputs.cache-hit != 'true' shell: cmd - run: make -j2 samples SHELL=cmd + run: make -j2 samples SHELL=cmd QUIET=1 diff --git a/libsrc/Makefile b/libsrc/Makefile index 9e1592dd3..821ff8372 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -8,6 +8,16 @@ ifneq ($(shell echo),) CMD_EXE = 1 endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: + PQ = "QUIET=1" + PD = --no-print-directory +endif + CBMS = c128 \ c16 \ c64 \ @@ -133,7 +143,7 @@ zip: $(foreach dir,$(OUTPUTDIRS),$(ZIP_recipe)) $(TARGETS): | ../lib - @$(MAKE) --no-print-directory $@ + @$(MAKE) $(PD) $@ $(PQ) # ../lib must be created globally before doing lib targets in parallel ../lib: @@ -252,8 +262,8 @@ $1_DYNS = $$(patsubst $$($1_SRCPAT),$$($1_DYNPAT),$$($1_SRCS)) $1_DRVS = $$(patsubst $$($1_DYNPAT),$$($1_DRVPAT),$$($1_DYNS)) $$($1_STCPAT): $$($1_SRCPAT) - @echo $$(TARGET) - $$< - static - @$$(CA65) -t $$(TARGET) -D DYN_DRV=0 $$(CA65FLAGS) --create-dep $$(@:.o=.d) -o $$@ $$< + $$(if $$(QUIET),@echo $$(TARGET) - $$< - static) + $$(CA65) -t $$(TARGET) -D DYN_DRV=0 $$(CA65FLAGS) --create-dep $$(@:.o=.d) -o $$@ $$< OBJS += $$($1_STCS) DEPS += $$($1_STCS:.o=.d) @@ -261,8 +271,8 @@ DEPS += $$($1_STCS:.o=.d) $$($1_DYNS): | $$($1_DYNDIR) $$($1_DRVPAT): $$($1_DYNPAT) $$(ZPOBJ) | $$($1_DRVDIR) - @echo $$(TARGET) - $$($( endef # D64_WRITE_SEQ_recipe samples.d64: samples + $(if $(QUIET),echo $(SYS):$@) @$(C1541) -format "samples,00" d64 $@ >$(NULLDEV) $(foreach file,$(EXELIST_$(SYS)),$(D64_WRITE_PRG_recipe)) # $(foreach file,$(OVERLAYLIST),$(D64_WRITE_PRG_recipe)) diff --git a/samples/disasm/Makefile b/samples/disasm/Makefile index 6599915f6..df883fa7c 100644 --- a/samples/disasm/Makefile +++ b/samples/disasm/Makefile @@ -37,6 +37,14 @@ else DA := $(if $(wildcard ../../bin/da65*),../../bin/da65,da65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + CPP = cpp #CPPFLAGS = -DTEST_ERROR @@ -56,6 +64,7 @@ $(DAIS): fixed.da $(DA) --sync-lines -o $@ -i $< image.bin image.bin: image.s image.cfg + $(if $(QUIET),echo $(SYS):$@) $(CL) -t none -C image.cfg -o image.bin image.s clean: diff --git a/samples/gamate/Makefile b/samples/gamate/Makefile index 35aef293d..4f20f047a 100644 --- a/samples/gamate/Makefile +++ b/samples/gamate/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_gamate = \ nachtm.bin @@ -56,6 +64,7 @@ else endif nachtm.bin: nachtm.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -Os -l nachtm.lst -t gamate -o nachtm.bin nachtm.c ../../util/gamate/gamate-fixcart nachtm.bin diff --git a/samples/geos/Makefile b/samples/geos/Makefile index ad4033f80..0ede7e78c 100644 --- a/samples/geos/Makefile +++ b/samples/geos/Makefile @@ -17,11 +17,15 @@ C1541 ?= c1541 ifeq ($(origin SYS),command line) ifeq ($(SYS),c64) override SYS = geos-cbm - $(info GEOS: c64 -> geos-cbm) + ifneq ($(SILENT),s) + $(info GEOS: c64 -> geos-cbm) + endif endif ifeq ($(SYS),apple2enh) override SYS = geos-apple - $(info GEOS: apple2enh -> geos-apple) + ifneq ($(SILENT),s) + $(info GEOS: apple2enh -> geos-apple) + endif endif endif @@ -55,6 +59,14 @@ else SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + DIRLIST = grc define SUBDIR_recipe @@ -111,36 +123,47 @@ bitmap.c: logo.pcx $(SP) -r logo.pcx -c geos-bitmap -w bitmap.c,ident=bitmap bitmap-demo.cvt: bitmap.c bitmap-demores.grc bitmap-demo.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m bitmap-demo.map bitmap-demores.grc bitmap-demo.c filesel.cvt: fileselres.grc filesel.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m filesel.map fileselres.grc filesel.c geosconio.cvt: geosconiores.grc geosconio.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m geosconio.map geosconiores.grc geosconio.c geosver.cvt: geosverres.grc geosver.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m geosver.map geosverres.grc geosver.c getid.cvt: getidres.grc getid.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m getid.map getidres.grc getid.c hello1.cvt: hello1res.grc hello1.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m hello1.map hello1res.grc hello1.c hello2.cvt: hello2res.grc hello2.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m hello2.map hello2res.grc hello2.c overlay-demo.cvt: overlay-demores.grc overlay-demo.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m overlay-demo.map overlay-demores.grc overlay-demo.c rmvprot.cvt: rmvprotres.grc rmvprot.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m rmvprot.map rmvprotres.grc rmvprot.c vector-demo.cvt: vector-demores.grc vector-demo.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m vector-demo.map vector-demores.grc vector-demo.c yesno.cvt: yesnores.grc yesno.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o $@ -m yesno.map yesnores.grc yesno.c diff --git a/samples/geos/grc/Makefile b/samples/geos/grc/Makefile index 360c7bc7d..101d501e8 100644 --- a/samples/geos/grc/Makefile +++ b/samples/geos/grc/Makefile @@ -39,6 +39,14 @@ else GRC := $(if $(wildcard ../../../bin/grc65*),../../../bin/grc65,grc65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_geos-cbm = \ test.s \ vlir.cvt @@ -56,9 +64,11 @@ samples: endif test.s: test.grc + $(if $(QUIET),echo $(SYS):$@) $(GRC) -s test.s test.grc vlir.cvt: vlir.grc vlir0.s vlir1.s vlir2.s + $(if $(QUIET),echo $(SYS):$@) # using separate calls here for demonstration purposes: $(GRC) -t $(SYS) -s vlir.s vlir.grc $(AS) -t $(SYS) vlir.s diff --git a/samples/kim1/Makefile b/samples/kim1/Makefile index dbdbcec8d..eca7d6524 100644 --- a/samples/kim1/Makefile +++ b/samples/kim1/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_kim1 = \ kimHello.bin \ kimSieve.bin \ @@ -66,40 +74,51 @@ ramfont.o: ramfont.asm $(AS) ramfont.asm -o ramfont.o kimLife.bin: kimLife.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t kim1 -C kim1-60k.cfg -Oi -o kimLife.bin kimLife.c kimTest.bin: kimTest.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t kim1 -C kim1-60k.cfg -Oi -o kimTest.bin kimTest.c kimGFX.bin: kimGFX.c subs.o ramfont.o + $(if $(QUIET),echo $(SYS):$@) $(CL) -t kim1 --listing kimGFX.lst -C kim1-mtuE000.cfg -o kimGFX.bin kimGFX.c subs.o ramfont.o -Ln kimgfx.lbl kimSieve.bin: kimSieve.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t kim1 -C kim1-60k.cfg -O -o kimSieve.bin kimSieve.c kimHello.bin: kimHello.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t kim1 -O -o kimHello.bin kimHello.c # To build an intel-format file for the CORSHAM SD card reader kimLife.hex: kimLife.bin + $(if $(QUIET),echo $(SYS):$@) srec_cat kimLife.bin -binary -offset 0x2000 -o kimLife.hex -Intel -address-length=2 kimTest.hex: kimTest.bin + $(if $(QUIET),echo $(SYS):$@) srec_cat kimTest.bin -binary -offset 0x2000 -o kimTest.hex -Intel -address-length=2 kimGFX.hex: kimGFX.bin ramfont.o + $(if $(QUIET),echo $(SYS):$@) srec_cat kimGFX.bin -binary -offset 0x2000 -o kimGFX.hex -Intel -address-length=2 # To build a paper tape file for uploading to the KIM-1 via terminal kimLife.ptp: kimLife.bin + $(if $(QUIET),echo $(SYS):$@) srec_cat kimLife.bin -binary -offset 0x2000 -o kimLife.ptp -MOS_Technologies kimGFX.ptp: kimGFX.bin + $(if $(QUIET),echo $(SYS):$@) srec_cat kimGFX.bin -binary -offset 0x2000 -o kimGFX.ptp -MOS_Technologies kimTest.ptp: kimTest.bin + $(if $(QUIET),echo $(SYS):$@) srec_cat kimTest.bin -binary -offset 0x2000 -o kimTest.ptp -MOS_Technologies clean: diff --git a/samples/lynx/Makefile b/samples/lynx/Makefile index 078ea129a..e27d5801a 100644 --- a/samples/lynx/Makefile +++ b/samples/lynx/Makefile @@ -35,6 +35,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_lynx = \ hello.lnx \ mandelbrot.lnx \ @@ -59,6 +67,7 @@ endif .SUFFIXES: .c .lnx %.lnx : %.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -Oris -m $*.map -o $@ $< clean: diff --git a/samples/sim65/Makefile b/samples/sim65/Makefile index 3a06321ee..43783afca 100644 --- a/samples/sim65/Makefile +++ b/samples/sim65/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_sim6502 = \ cpumode_example.bin \ timer_example.bin \ @@ -61,6 +69,7 @@ endif .SUFFIXES: .c .bin %.bin : %.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -Oris -m $*.map -o $@ $< clean: diff --git a/samples/supervision/Makefile b/samples/supervision/Makefile index 9396be63d..cae5885ff 100644 --- a/samples/supervision/Makefile +++ b/samples/supervision/Makefile @@ -39,6 +39,14 @@ else SP := $(if $(wildcard ../../bin/sp65*),../../bin/sp65,sp65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_supervision = \ hello @@ -58,6 +66,7 @@ else endif hello: hello.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o hello -m hello.map hello.c clean: diff --git a/samples/sym1/Makefile b/samples/sym1/Makefile index 8abcfb5aa..a5b2e35b5 100644 --- a/samples/sym1/Makefile +++ b/samples/sym1/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_sym1 = \ symHello.bin symTiny.bin symDisplay.bin symIO.bin symNotepad.bin symExtendedMemory.bin @@ -56,21 +64,27 @@ else endif symHello.bin: symHello.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t sym1 -O -o symHello.bin symHello.c symTiny.bin: symTiny.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t sym1 -O -o symTiny.bin symTiny.c symDisplay.bin: symDisplay.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t sym1 -O -o symDisplay.bin symDisplay.c symIO.bin: symIO.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t sym1 -C sym1-32k.cfg -O -o symIO.bin symIO.c symNotepad.bin: symNotepad.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t sym1 -C sym1-32k.cfg -O -o symNotepad.bin symNotepad.c symExtendedMemory.bin: symExtendedMemory.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t sym1 -C sym1-32k.cfg -O -o symExtendedMemory.bin symExtendedMemory.c diff --git a/samples/tutorial/Makefile b/samples/tutorial/Makefile index 685c8dd69..3c3d1edb9 100644 --- a/samples/tutorial/Makefile +++ b/samples/tutorial/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_atari2600 = \ notavailable @@ -86,9 +94,12 @@ ifndef EXELIST_$(SYS) EXELIST_$(SYS) := ${patsubst %.c,%,$(wildcard *.c)} endif +all: samples + samples: $(EXELIST_$(SYS)) hello: hello.c text.s + $(if $(QUIET),echo $(SYS):$@) $(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 diff --git a/src/Makefile b/src/Makefile index 085a50f9d..bdeaf4bc9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,12 +8,6 @@ ifneq ($(shell echo),) CMD_EXE = 1 endif -ifneq ($(V),1) - Q=@ -else - Q= -endif - PROGS = ar65 \ ca65 \ cc65 \ @@ -52,6 +46,21 @@ else RMDIR = $(RM) -r $1 endif +ifeq ($(SILENT),s) + QUIET = 1 + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) +endif + +ifdef QUIET + .SILENT: + PQ = "QUIET=1" + PD = --no-print-directory +ifndef CMD_EXE + CATERR = 2> ../wrk/common/$$@.errlog || (cat ../wrk/common/$$@.errlog && false) +endif +endif + CC = $(CROSS_COMPILE)gcc AR = $(CROSS_COMPILE)ar @@ -70,7 +79,10 @@ ifndef BUILD_ID BUILD_ID := N/A endif endif -$(info BUILD_ID: $(BUILD_ID)) + +ifneq ($(SILENT),s) + $(info BUILD_ID: $(BUILD_ID)) +endif CFLAGS += -MMD -MP -O3 -I common \ -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) \ @@ -161,8 +173,8 @@ $1: ../bin/$1$(EXE_SUFFIX) endef # PROG_template ../wrk/%.o: %.c - @echo $< - $(Q)$(CC) -c $(CFLAGS) -o $@ $< + $(if $(QUIET),echo CC:$@) + $(CC) -c $(CFLAGS) -o $@ $< ../bin: @$(call MKDIR,$@) @@ -170,7 +182,8 @@ endef # PROG_template $(eval $(call OBJS_template,common)) ../wrk/common/common.a: $(common_OBJS) - $(AR) r $@ $? + $(if $(QUIET),echo AR:$@) + $(AR) r $@ $? $(CATERR) $(foreach prog,$(PROGS),$(eval $(call PROG_template,$(prog)))) @@ -184,6 +197,7 @@ $(eval $(call OBJS_template,dbginfo)) dbginfo: $(dbginfo_OBJS) ../wrk/dbgsh$(EXE_SUFFIX): $(dbginfo_OBJS) ../wrk/common/common.a + $(if $(QUIET),echo LINK:$@) $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) dbgsh: ../wrk/dbgsh$(EXE_SUFFIX) diff --git a/targettest/Makefile b/targettest/Makefile index a9a7ef77d..38b44035e 100644 --- a/targettest/Makefile +++ b/targettest/Makefile @@ -47,6 +47,16 @@ else LD := $(if $(wildcard ../bin/ld65*),../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: + PQ = "QUIET=1" + PD = --no-print-directory +endif + ifneq ($(filter disk testcode.%,$(MAKECMDGOALS)),) ifdef CC65_HOME TARGET_PATH = $(CC65_HOME)/target @@ -120,10 +130,12 @@ DISK_atarixl = testcode.atr %: %.s .c.o: + $(if $(QUIET),echo $(SYS):$*.c) $(CC) $(CFLAGS) -Ors --codesize 500 -T -g -t $(SYS) $< $(AS) $(<:.c=.s) .s.o: + $(if $(QUIET),echo $(SYS):$*.s) $(AS) $(ASFLAGS) -t $(SYS) $< .PRECIOUS: %.o @@ -779,7 +791,7 @@ endif define SUBDIR_recipe -@+$(MAKE) -C $(dir) --no-print-directory $@ +@+$(MAKE) -C $(dir) $(PD) $@ $(PQ) endef # SUBDIR_recipe @@ -839,25 +851,34 @@ TARGETS := \ # -------------------------------------------------------------------------- # Rule to make the binaries for every platform +define TARGETDIR_recipe + +@+$(MAKE) -C $(dir) $(PD) $(PQ) + +endef # TARGETDIR_recipe + define TARGET_recipe @echo making targettest for: $(T) @$(MAKE) -j2 SYS:=$(T) -@$(MAKE) --no-print-directory clean SYS:=$(T) +@$(MAKE) $(PD) clean SYS:=$(T) endef # TARGET_recipe platforms: $(foreach T,$(TARGETS),$(TARGET_recipe)) + $(foreach dir,$(DIRLIST),$(TARGETDIR_recipe)) # -------------------------------------------------------------------------- # some programs link against getsp.o mouse-test: mouse-test.o getsp.o + $(if $(QUIET),echo $(SYS):$@) $(LD) $(LDFLAGS) -t $(SYS) -o $@ $^ $(SYS).lib ifneq ($(SYS),vic20) ft: ft.o getsp.o + $(if $(QUIET),echo $(SYS):$@) $(LD) $(LDFLAGS) -t $(SYS) -o $@ $^ $(SYS).lib endif @@ -865,6 +886,7 @@ endif ifeq ($(SYS),vic20) ft: ft.o getsp.o + $(if $(QUIET),echo $(SYS):$@) $(LD) $(LDFLAGS) -o $@ -C vic20-32k.cfg -m $@.map $^ $(SYS).lib endif diff --git a/targettest/accelerator/Makefile b/targettest/accelerator/Makefile index 6e710d010..a8d26e368 100644 --- a/targettest/accelerator/Makefile +++ b/targettest/accelerator/Makefile @@ -36,6 +36,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_c64 = \ c64-scpu-test.prg \ c64dtv-test.prg \ @@ -64,27 +72,35 @@ else endif c64-scpu-test.prg: c64-c128-scpu-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c64 c64-c128-scpu-test.c -o c64-scpu-test.prg c128-scpu-test.prg: c64-c128-scpu-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c128 c64-c128-scpu-test.c -o c128-scpu-test.prg c64dtv-test.prg: c64dtv-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c64 c64dtv-test.c -o c64dtv-test.prg c64-test.prg: c64-c128-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c64 c64-c128-test.c -o c64-test.prg c128-test.prg: c64-c128-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c128 c64-c128-test.c -o c128-test.prg chameleon-test.prg: chameleon-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c64 chameleon-test.c -o chameleon-test.prg c65-test.prg: c65-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c64 c65-test.c -o c65-test.prg turbomaster-test.prg: turbomaster-test.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t c64 turbomaster-test.c -o turbomaster-test.prg clean: diff --git a/targettest/atari/Makefile b/targettest/atari/Makefile index 0e376e9bc..099dd291c 100644 --- a/targettest/atari/Makefile +++ b/targettest/atari/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_atari = \ charmapping.xex \ defdev.xex \ @@ -64,24 +72,33 @@ else endif charmapping.xex: charmapping.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -o charmapping.xex charmapping.c defdev.xex: defdev.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -o defdev.xex defdev.c displaylist.xex: displaylist.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -o displaylist.xex displaylist.c mem.xex: mem.c ../getsp.s + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -o mem.xex mem.c ../getsp.s multi.xex: multi-xex.s multi-xex.cfg + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -C multi-xex.cfg multi-xex.s -o multi.xex ostype.xex: ostype.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -o ostype.xex ostype.c scrcode.com: scrcode.s + $(if $(QUIET),echo $(SYS):$@) # ca65 -t atari -o scrcode.o scrcode.s # ld65 -C atari-asm.cfg -o scrcode.com scrcode.o $(CL) -t atari -C atari-asm.cfg -o scrcode.com scrcode.s sys.xex: sys.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -o sys.xex sys.c sound.xex: sound.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t atari -o sound.xex sound.c clean: @$(DEL) charmapping.xex 2>$(NULLDEV) diff --git a/targettest/cbm/Makefile b/targettest/cbm/Makefile index ebe00198f..6359a154a 100644 --- a/targettest/cbm/Makefile +++ b/targettest/cbm/Makefile @@ -40,6 +40,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_c64 = \ petscii.prg \ cbmdir-test.prg \ @@ -73,12 +81,14 @@ endif ifeq ($(SYS),c64) petscii.prg: petscii.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t $(SYS) -O -o petscii.prg petscii.c else petscii.prg: endif cbmdir-test.prg: cbmdir-test.c + $(if $(QUIET),echo $(SYS):$@) ifeq ($(SYS),vic20) $(CL) -t $(SYS) -C vic20-32k.cfg -Oris -o $@ $< else @@ -86,6 +96,7 @@ else endif cbmread.prg: cbmread.c + $(if $(QUIET),echo $(SYS):$@) ifeq ($(SYS),vic20) $(CL) -t $(SYS) -C vic20-32k.cfg -Oris -o $@ $< else diff --git a/targettest/gamate/Makefile b/targettest/gamate/Makefile index f03c2b064..21fd039ec 100644 --- a/targettest/gamate/Makefile +++ b/targettest/gamate/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + EXELIST_gamate = \ audiotest.bin lcdtest.bin ctest.bin @@ -56,10 +64,13 @@ else endif audiotest.bin: audiotest.s + $(if $(QUIET),echo $(SYS):$@) $(CL) -l audiotest.lst -t gamate -o audiotest.bin audiotest.s lcdtest.bin: lcdtest.s + $(if $(QUIET),echo $(SYS):$@) $(CL) -l lcdtest.lst -t gamate -o lcdtest.bin lcdtest.s ctest.bin: ctest.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -l ctest.lst -t gamate -o ctest.bin ctest.c clean: diff --git a/targettest/pce/Makefile b/targettest/pce/Makefile index 549720a40..53516d55d 100644 --- a/targettest/pce/Makefile +++ b/targettest/pce/Makefile @@ -37,6 +37,14 @@ else LD := $(if $(wildcard ../../bin/ld65*),../../bin/ld65,ld65) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif + .PHONY: all clean test # Size of cartridge to generate. @@ -71,8 +79,11 @@ else endif %.bin: %.c + $(if $(QUIET),echo $(SYS):$@) $(CL) -t pce $< -Wl -D__CARTSIZE__=${CARTSIZE} -m $*.map -o $@ +ifndef QUIET @echo "use 'make conio.pce' to produce a .pce file using dd" +endif %.pce: %.bin dd if=$< bs=8K skip=${COUNT} > $@ diff --git a/test/Makefile b/test/Makefile index 94bc7e5ea..b647dbe33 100644 --- a/test/Makefile +++ b/test/Makefile @@ -16,6 +16,15 @@ else RMDIR = $(RM) -r $1 endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + PQ = "QUIET=1" + PD = --no-print-directory +endif + WORKDIR = ../testwrk .PHONY: test continue mostlyclean clean success_message @@ -25,15 +34,15 @@ test: @$(MAKE) continue continue: - @$(MAKE) -C asm all - @$(MAKE) -C dasm all - @$(MAKE) -C val all - @$(MAKE) -C ref all - @$(MAKE) -C err all - @$(MAKE) -C standard all - @$(MAKE) -C standard_err all - @$(MAKE) -C misc all - @$(MAKE) -C todo all + @$(MAKE) $(PD) -C asm all $(PQ) + @$(MAKE) $(PD) -C dasm all $(PQ) + @$(MAKE) $(PD) -C val all $(PQ) + @$(MAKE) $(PD) -C ref all $(PQ) + @$(MAKE) $(PD) -C err all $(PQ) + @$(MAKE) $(PD) -C standard all $(PQ) + @$(MAKE) $(PD) -C standard_err all $(PQ) + @$(MAKE) $(PD) -C misc all $(PQ) + @$(MAKE) $(PD) -C todo all $(PQ) @$(MAKE) success_message success_message: @@ -42,15 +51,15 @@ success_message: $(info ###################################) mostlyclean: - @$(MAKE) -C asm clean - @$(MAKE) -C dasm clean - @$(MAKE) -C val clean - @$(MAKE) -C ref clean - @$(MAKE) -C err clean - @$(MAKE) -C standard clean - @$(MAKE) -C standard_err clean - @$(MAKE) -C misc clean - @$(MAKE) -C todo clean + @$(MAKE) $(PD) -C asm clean $(PQ) + @$(MAKE) $(PD) -C dasm clean $(PQ) + @$(MAKE) $(PD) -C val clean $(PQ) + @$(MAKE) $(PD) -C ref clean $(PQ) + @$(MAKE) $(PD) -C err clean $(PQ) + @$(MAKE) $(PD) -C standard clean $(PQ) + @$(MAKE) $(PD) -C standard_err clean $(PQ) + @$(MAKE) $(PD) -C misc clean $(PQ) + @$(MAKE) $(PD) -C todo clean $(PQ) clean: mostlyclean @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/Makefile b/test/asm/Makefile index 2d5ba764e..8d959ecae 100644 --- a/test/asm/Makefile +++ b/test/asm/Makefile @@ -16,6 +16,15 @@ else RMDIR = $(RM) -r $1 endif +ifeq ($(SILENT),s) + QUIET := 1 +endif + +ifdef QUIET + PQ = "QUIET=1" + PD = --no-print-directory +endif + WORKDIR = ../testwrk/asm .PHONY: all continue mostlyclean clean @@ -23,20 +32,20 @@ WORKDIR = ../testwrk/asm all: mostlyclean continue continue: mostlyclean - @$(MAKE) -C cpudetect all - @$(MAKE) -C opcodes all - @$(MAKE) -C listing all - @$(MAKE) -C val all - @$(MAKE) -C err all - @$(MAKE) -C misc all + @$(MAKE) $(PD) -C cpudetect all $(PQ) + @$(MAKE) $(PD) -C opcodes all $(PQ) + @$(MAKE) $(PD) -C listing all $(PQ) + @$(MAKE) $(PD) -C val all $(PQ) + @$(MAKE) $(PD) -C err all $(PQ) + @$(MAKE) $(PD) -C misc all $(PQ) mostlyclean: - @$(MAKE) -C cpudetect clean - @$(MAKE) -C opcodes clean - @$(MAKE) -C listing clean - @$(MAKE) -C val clean - @$(MAKE) -C err clean - @$(MAKE) -C misc clean + @$(MAKE) $(PD) -C cpudetect clean $(PQ) + @$(MAKE) $(PD) -C opcodes clean $(PQ) + @$(MAKE) $(PD) -C listing clean $(PQ) + @$(MAKE) $(PD) -C val clean $(PQ) + @$(MAKE) $(PD) -C err clean $(PQ) + @$(MAKE) $(PD) -C misc clean $(PQ) clean: mostlyclean @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/cpudetect/Makefile b/test/asm/cpudetect/Makefile index fde19b17b..d0077bfd9 100644 --- a/test/asm/cpudetect/Makefile +++ b/test/asm/cpudetect/Makefile @@ -20,8 +20,14 @@ else RMDIR = $(RM) -r $1 endif + ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65) @@ -52,8 +58,8 @@ define CPUDETECT_template $(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL) $(if $(QUIET),echo asm/$1-cpudetect.bin) - $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< - $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib + $(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< $(CATERR) + $(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib $(CATERR) $(ISEQUAL) $1-cpudetect.ref $$@ endef # CPUDETECT_template @@ -61,7 +67,7 @@ endef # CPUDETECT_template $(foreach cpu,$(CPUDETECT_CPUS),$(eval $(call CPUDETECT_template,$(cpu)))) $(WORKDIR)/%.o: %.s | $(WORKDIR) - $(CA65) -l $(@:.o=.lst) -o $@ $< + $(CA65) -l $(@:.o=.lst) -o $@ $< $(NULLOUT) $(CATERR) clean: @$(call RMDIR,$(WORKDIR)) diff --git a/test/asm/err/Makefile b/test/asm/err/Makefile index c1a8285e4..8b93cd80d 100644 --- a/test/asm/err/Makefile +++ b/test/asm/err/Makefile @@ -26,7 +26,11 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65) diff --git a/test/asm/listing/Makefile b/test/asm/listing/Makefile index 4321d3b95..dc2c43d73 100644 --- a/test/asm/listing/Makefile +++ b/test/asm/listing/Makefile @@ -17,6 +17,7 @@ ifdef CMD_EXE RMDIR = -rmdir /q /s $(subst /,\,$1) TRUE = exit 0 CAT = type $(subst /,\,$1) + NULLDEV = nul: else S = / EXE = @@ -24,10 +25,16 @@ else RMDIR = $(RM) -r $1 TRUE = true CAT = cat $1 + NULLDEV = /dev/null endif ifdef QUIET -# .SILENT: + .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65) @@ -82,48 +89,52 @@ endif endif ifneq ($(wildcard ref/$1.err-ref),) - $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err) + $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.err) + $(ISEQUAL) --empty $$(@:.bin=.err) $(NULLERR) endif ifneq ($(wildcard ref/$1.err2-ref),) - $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2) + $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.err2) + $(ISEQUAL) --empty $$(@:.bin=.err2) $(NULLERR) endif ifneq ($(wildcard ref/$1.bin-ref),) - $(ISEQUAL) --binary ref/$1.bin-ref $$@ + $(ISEQUAL) --binary ref/$1.bin-ref $$@ $(NULLERR) endif # rem $(indfo $(CAT) $(subst /,$$S,$$$(@:.bin=.ld65-err))) ifneq ($(wildcard ref/$1.ld65err-ref),) +ifndef QUIET @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) endif - $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err) +endif + $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),) - $(ISEQUAL) --empty $$(@:.bin=.ld65-err) + $(ISEQUAL) --empty $$(@:.bin=.ld65-err) $(NULLERR) endif endif ifneq ($(wildcard ref/$1.ld65err2-ref),) +ifndef QUIET @echo $(CAT) $$(@:.bin=.ld65-err2) # FIXME: somehow this refuses to work in cmd.exe ifndef CMD_EXE $(call CAT,$$(@:.bin=.ld65-err2)) -diff -u ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) endif - $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) +endif + $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.ld65-err2),) - $(ISEQUAL) --empty $$(@:.bin=.ld65-err2) + $(ISEQUAL) --empty $$(@:.bin=.ld65-err2) $(NULLERR) endif endif @@ -149,37 +160,37 @@ endif endif ifneq ($(wildcard ref/$1.err-ref),) - $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err) + $(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.list-err) + $(ISEQUAL) --empty $$(@:.bin=.list-err) $(NULLERR) endif ifneq ($(wildcard ref/$1.ld65err-ref),) - $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err) + $(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err),) - $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err) + $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err) $(NULLERR) endif endif ifneq ($(wildcard ref/$1.err2-ref),) - $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2) + $(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2) $(NULLERR) else - $(ISEQUAL) --empty $$(@:.bin=.list-err2) + $(ISEQUAL) --empty $$(@:.bin=.list-err2) $(NULLERR) endif ifneq ($(wildcard ref/$1.ld65err2-ref),) - $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2) + $(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2) $(NULLERR) else ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err2),) - $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2) + $(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2) $(NULLERR) endif endif # check if the result bin is the same as without listing file ifeq ($(wildcard control/$1.err),) ifeq ($(wildcard control/$1.err2),) - $(ISEQUAL) $$@ $$(@:.bin=.list-bin) + $(ISEQUAL) $$@ $$(@:.bin=.list-bin) $(NULLERR) endif endif @@ -187,7 +198,7 @@ ifneq ($(wildcard ref/$1.list-ref),) # we have a reference file, compare that, too # remove first line which contains a version number - $(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst) + $(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst) $(NULLERR) endif endef # LISTING_template diff --git a/test/asm/misc/Makefile b/test/asm/misc/Makefile index 1b2305cda..3072fa24e 100644 --- a/test/asm/misc/Makefile +++ b/test/asm/misc/Makefile @@ -30,6 +30,9 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif SIM65FLAGS = -x 200000000 diff --git a/test/asm/opcodes/Makefile b/test/asm/opcodes/Makefile index 70dd41c06..2fe046bd9 100644 --- a/test/asm/opcodes/Makefile +++ b/test/asm/opcodes/Makefile @@ -22,6 +22,11 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65) diff --git a/test/asm/val/Makefile b/test/asm/val/Makefile index 08c000f95..fe27f97d1 100644 --- a/test/asm/val/Makefile +++ b/test/asm/val/Makefile @@ -51,8 +51,8 @@ define PRG_template $(WORKDIR)/%.$1.prg: %.s | $(WORKDIR) $(if $(QUIET),echo asm/val/$$*.$1.prg) - $(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR) - $(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR) + $(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLOUT) $(NULLERR) + $(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLOUT) $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) endef # PRG_template diff --git a/test/dasm/Makefile b/test/dasm/Makefile index 29e97b9c1..196975857 100644 --- a/test/dasm/Makefile +++ b/test/dasm/Makefile @@ -14,14 +14,21 @@ ifdef CMD_EXE EXE = .exe MKDIR = mkdir $(subst /,\,$1) RMDIR = -rmdir /q /s $(subst /,\,$1) + NULLDEV = nul: else EXE = MKDIR = mkdir -p $1 RMDIR = $(RM) -r $1 + NULLDEV = /dev/null endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) + NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) diff --git a/test/err/Makefile b/test/err/Makefile index a0cdc22ae..5bd198477 100644 --- a/test/err/Makefile +++ b/test/err/Makefile @@ -26,8 +26,13 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif +endif + CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65) @@ -45,7 +50,7 @@ $(WORKDIR): $(WORKDIR)/%.s: %.c | $(WORKDIR) $(if $(QUIET),echo err/$*.s) - $(NOT) $(CC65) -o $@ $< $(NULLERR) + $(NOT) $(CC65) -o $@ $< $(NULLOUT) $(CATERR) clean: @$(call RMDIR,$(WORKDIR)) diff --git a/test/misc/Makefile b/test/misc/Makefile index 989e8f83a..8eb360e52 100644 --- a/test/misc/Makefile +++ b/test/misc/Makefile @@ -30,6 +30,9 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif SIM65FLAGS = -x 200000000 @@ -68,7 +71,7 @@ define PRG_template $(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1209-ind-goto-rev.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) @@ -76,7 +79,7 @@ $(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR) $(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1209-ind-goto-rev-2.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) @@ -84,7 +87,7 @@ $(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDI $(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1209-ind-goto-rev-3.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) @@ -92,40 +95,40 @@ $(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDI $(WORKDIR)/pptest2.$1.$2.prg: pptest2.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/pptest2.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # should compile, but compiler exits with internal error $(WORKDIR)/bug1211-ice-move-refs-2.$1.$2.prg: bug1211-ice-move-refs-2.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." $(if $(QUIET),echo misc/bug1211-ice-move-refs-2.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # this one requires --std=c89, it fails with --std=c99 $(WORKDIR)/bug1265.$1.$2.prg: bug1265.c | $(WORKDIR) $(if $(QUIET),echo misc/bug1265.$1.$2.prg) - $(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR) # should not compile, but gives different diagnostics in C99 mode than in others -$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c | $(WORKDIR) +$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/bug2515.$1.$2.prg) - $(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out + $(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.c99.ref - $(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out + $(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.ref # should not issue any warnings in C99 mode -$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c | $(WORKDIR) +$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/bug2637.$1.$2.prg) - $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2637.$1.$2.out + $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2637.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2637.$1.$2.out bug2637.ref # this one requires -Werror $(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR) $(if $(QUIET),echo misc/bug1768.$1.$2.prg) - $(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR) @@ -133,7 +136,7 @@ $(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR) # should compile, but then hangs in an endless loop $(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR) $(if $(QUIET),echo misc/endless.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(NOT) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR) @@ -142,12 +145,12 @@ $(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR) # in a useful way $(WORKDIR)/bug2655.$1.$2.prg: bug2655.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/bug2655.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/bug2655.$1.$2.out + $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/bug2655.$1.$2.out $(ISEQUAL) $(WORKDIR)/bug2655.$1.$2.out bug2655.ref $(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/limits.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) $(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/limits.$1.$2.out @@ -155,24 +158,24 @@ $(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR) $(WORKDIR)/goto.$1.$2.prg: goto.c $(ISEQUAL) | $(WORKDIR) $(if $(QUIET),echo misc/goto.$1.$2.prg) - $(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/goto.$1.$2.out + $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/goto.$1.$2.out $(ISEQUAL) $(WORKDIR)/goto.$1.$2.out goto.ref # this one requires failure with --std=c89, it fails with --std=cc65 due to # stricter checks $(WORKDIR)/bug2304-implicit-func.$1.$2.prg: bug2304-implicit-func.c | $(WORKDIR) $(if $(QUIET),echo misc/bug2304-implicit-func.$1.$2.prg) - $(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # should not compile until 3-byte struct by value tests are re-enabled $(WORKDIR)/struct-by-value.$1.$2.prg: struct-by-value.c | $(WORKDIR) $(if $(QUIET),echo misc/struct-by-value.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # the rest are tests that fail currently for one reason or another $(WORKDIR)/sitest.$1.$2.prg: sitest.c | $(WORKDIR) @echo "FIXME: " $$@ "currently does not compile." - $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR) # $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) endef # PRG_template diff --git a/test/ref/Makefile b/test/ref/Makefile index 2dadf5bcc..1a5611083 100644 --- a/test/ref/Makefile +++ b/test/ref/Makefile @@ -29,7 +29,11 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif SIM65FLAGS = -x 200000000 diff --git a/test/standard/Makefile b/test/standard/Makefile index e359fa975..f09024b58 100644 --- a/test/standard/Makefile +++ b/test/standard/Makefile @@ -26,6 +26,9 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif SIM65FLAGS = -x 4000000000 -c diff --git a/test/standard_err/Makefile b/test/standard_err/Makefile index f554d33eb..702ad3f95 100644 --- a/test/standard_err/Makefile +++ b/test/standard_err/Makefile @@ -26,8 +26,13 @@ endif ifdef QUIET .SILENT: + NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif +endif + CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65) @@ -49,7 +54,7 @@ define PRG_template $(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR) $(if $(QUIET),echo standard_err/$$*.$1.$2.prg) - $(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLERR) + $(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) endef # PRG_template diff --git a/test/todo/Makefile b/test/todo/Makefile index ec14cf8d4..7a0cbfa54 100644 --- a/test/todo/Makefile +++ b/test/todo/Makefile @@ -28,7 +28,11 @@ ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) endif +endif + SIM65FLAGS = -x 200000000 diff --git a/test/val/Makefile b/test/val/Makefile index 68882971d..1f6f0ba4c 100644 --- a/test/val/Makefile +++ b/test/val/Makefile @@ -21,13 +21,16 @@ else NULLDEV = /dev/null MKDIR = mkdir -p $1 RMDIR = $(RM) -r $1 - CATRES = || (cat $(WORKDIR)/$$@.out && false) + CATRES = > $(WORKDIR)/$$@.out 2> $(WORKDIR)/$$@.out || (cat $(WORKDIR)/$$@.out && false) endif ifdef QUIET .SILENT: NULLOUT = >$(NULLDEV) NULLERR = 2>$(NULLDEV) +ifndef CMD_EXE + CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false) +endif endif SIM65FLAGS = -x 4000000000 -c @@ -56,10 +59,10 @@ define PRG_template $(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR) $(if $(QUIET),echo val/$$*.$1.$2.prg) - $(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLERR) - $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR) - $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR) - $(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/$$@.out $(CATRES) + $(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR) + $(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLOUT) $(CATERR) + $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLOUT) $(CATERR) + $(SIM65) $(SIM65FLAGS) $$@ $(CATRES) endef # PRG_template diff --git a/util/Makefile b/util/Makefile index 337320d36..96d2ec629 100644 --- a/util/Makefile +++ b/util/Makefile @@ -4,6 +4,15 @@ ifneq ($(SILENT),s) $(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS)) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: + PQ = "QUIET=1" + PD = --no-print-directory +endif .PHONY: atari gamate zlib @@ -12,16 +21,16 @@ util: atari gamate zlib all: util atari: - @$(MAKE) -C atari --no-print-directory $@ + @$(MAKE) -C atari $(PD) $(PQ) gamate: - @$(MAKE) -C gamate --no-print-directory $@ + @$(MAKE) -C gamate $(PD) $(PQ) zlib: - @$(MAKE) -C zlib --no-print-directory $@ + @$(MAKE) -C zlib $(PD) $(PQ) mostlyclean clean: - @$(MAKE) -C atari --no-print-directory $@ - @$(MAKE) -C gamate --no-print-directory $@ - @$(MAKE) -C zlib --no-print-directory $@ + @$(MAKE) -C atari $(PD) $@ $(PQ) + @$(MAKE) -C gamate $(PD) $@ $(PQ) + @$(MAKE) -C zlib $(PD) $@ $(PQ) install zip: diff --git a/util/atari/Makefile b/util/atari/Makefile index aa3163ec4..74b7ee78a 100644 --- a/util/atari/Makefile +++ b/util/atari/Makefile @@ -4,6 +4,13 @@ ifneq ($(SILENT),s) $(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS)) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif CC = $(CROSS_COMPILE)gcc @@ -28,6 +35,7 @@ CFLAGS += -O3 -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) atari: ataricvt ataricvt: ataricvt.c + $(if $(QUIET),echo HOST:$@) $(CC) $(CFLAGS) -o ataricvt ataricvt.c mostlyclean clean: diff --git a/util/gamate/Makefile b/util/gamate/Makefile index d9b4bbd42..7d1681c37 100644 --- a/util/gamate/Makefile +++ b/util/gamate/Makefile @@ -4,6 +4,13 @@ ifneq ($(SILENT),s) $(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS)) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif CC = $(CROSS_COMPILE)gcc @@ -28,6 +35,7 @@ CFLAGS += -O3 -Wall -Wextra -Wno-char-subscripts $(USER_CFLAGS) gamate: gamate-fixcart gamate-fixcart: gamate-fixcart.c + $(if $(QUIET),echo HOST:$@) $(CC) $(CFLAGS) -o gamate-fixcart gamate-fixcart.c mostlyclean clean: diff --git a/util/zlib/Makefile b/util/zlib/Makefile index 8068ea120..5778ae821 100644 --- a/util/zlib/Makefile +++ b/util/zlib/Makefile @@ -4,6 +4,13 @@ ifneq ($(SILENT),s) $(info Using Makefile: $(realpath $(firstword $(MAKEFILE_LIST))) $(MAKECMDGOALS)) endif +ifeq ($(SILENT),s) + QUIET = 1 +endif + +ifdef QUIET + .SILENT: +endif CC = $(CROSS_COMPILE)gcc @@ -35,6 +42,7 @@ warning: @echo "note that you need zlib installed first" deflater: deflater.c + $(if $(QUIET),echo HOST:$@) $(CC) $(CFLAGS) -o deflater deflater.c -lz mostlyclean clean: