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

@@ -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) - $$(<F)
@$$(LD65) -o $$@ -t module $$^
$$(if $$(QUIET),@echo $$(TARGET) - $$(<F))
$$(LD65) -o $$@ -t module $$^
$$($1_DYNDIR) $$($1_DRVDIR):
@$$(call MKDIR,$$@)
@@ -284,16 +294,16 @@ export CC65_HOME := $(abspath ..)
define ASSEMBLE_recipe
$(if $(QUIET),,@echo $(TARGET) - $<)
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $<
$(if $(QUIET),@echo $(TARGET) - $<)
$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:.o=.d) -o $@ $<
endef # ASSEMBLE_recipe
define COMPILE_recipe
$(if $(QUIET),,@echo $(TARGET) - $<)
@$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
@$(CA65) -t $(TARGET) -o $@ $(@:.o=.s)
$(if $(QUIET),@echo $(TARGET) - $<)
$(CC65) -t $(TARGET) $(CC65FLAGS) --create-dep $(@:.o=.d) --dep-target $@ -o $(@:.o=.s) $<
$(CA65) -t $(TARGET) -o $@ $(@:.o=.s)
endef # COMPILE_recipe
@@ -304,12 +314,13 @@ endef # COMPILE_recipe
$(COMPILE_recipe)
$(EXTRA_OBJPAT): $(EXTRA_SRCPAT) | ../libwrk/$(TARGET) ../lib
@echo $(TARGET) - $(<F)
$(if $(QUIET),@echo $(TARGET) - $(<F))
@$(CA65) -t $(TARGET) $(CA65FLAGS) --create-dep $(@:../lib/%.o=../libwrk/$(TARGET)/%.d) -o $@ $<
$(EXTRA_OBJS): | ../lib
../lib/$(TARGET).lib: $(OBJS) | ../lib
$(if $(QUIET),@echo $(TARGET) - $<)
$(AR65) a $@ $?
../libwrk/$(TARGET) ../target/$(TARGET)/util: