build: allow the user to specify make V=1 for verbose build

it's often required to see the full commandline when things go wrong.
the standard way for Makefile-only based buildsystems and autoconf
is to pass V=1 to make.
This commit is contained in:
rofl0r
2022-04-25 14:58:38 +00:00
committed by mrdudz
parent 3922cccafb
commit 09e0dd02a0

View File

@@ -2,6 +2,12 @@ ifneq ($(shell echo),)
CMD_EXE = 1 CMD_EXE = 1
endif endif
ifneq ($(V),1)
Q=@
else
Q=
endif
PROGS = ar65 \ PROGS = ar65 \
ca65 \ ca65 \
cc65 \ cc65 \
@@ -147,7 +153,7 @@ endef # PROG_template
../wrk/%.o: %.c ../wrk/%.o: %.c
@echo $< @echo $<
@$(CC) -c $(CFLAGS) -o $@ $< $(Q)$(CC) -c $(CFLAGS) -o $@ $<
../bin: ../bin:
@$(call MKDIR,$@) @$(call MKDIR,$@)