Merge pull request #2746 from mrdudz/bequiet

Fix -s vs QUIET in the makefiles
This commit is contained in:
Bob Andrews
2025-06-27 16:43:13 +02:00
committed by GitHub
46 changed files with 552 additions and 140 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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)

View File

@@ -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

View File

@@ -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:

View File

@@ -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} > $@