summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2016-02-21 10:45:42 +0100
committerMichał Cichoń <michcic@gmail.com>2017-05-17 03:01:26 +0200
commit7c4b615a38a49e1bbe9c2315fed09920aa238b65 (patch)
tree482876c81a15c77899b93768f80f67354d650bf8 /Makefile
parentba183a09135c03763a4790cdafac2e43d8dbccd0 (diff)
downloadpianobar-windows-7c4b615a38a49e1bbe9c2315fed09920aa238b65.tar.gz
pianobar-windows-7c4b615a38a49e1bbe9c2315fed09920aa238b65.tar.bz2
pianobar-windows-7c4b615a38a49e1bbe9c2315fed09920aa238b65.zip
Makefile: Provide a way to disable silent rules
Fixes #571 # Conflicts: # Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 24 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 78f1d43..0033660 100644
--- a/Makefile
+++ b/Makefile
@@ -84,26 +84,34 @@ ALL_LDFLAGS:=${LDFLAGS} -lao -lpthread -lm \
${LIBAV_LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS} ${LIBCURL_LDFLAGS}
+# Be verbose if V=1 (gnu autotools’ --disable-silent-rules)
+SILENTCMD:=@
+SILENTECHO:=@echo
+ifeq (${V},1)
+ SILENTCMD:=
+ SILENTECHO:=@true
+endif
+
# build pianobar
ifeq (${DYNLINK},1)
pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0
- @echo " LINK $@"
- @${CC} -o $@ ${PIANOBAR_OBJ} -L. -lpiano ${ALL_LDFLAGS}
+ ${SILENTECHO} " LINK $@"
+ ${SILENTCMD}${CC} -o $@ ${PIANOBAR_OBJ} -L. -lpiano ${ALL_LDFLAGS}
else
pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ}
- @echo " LINK $@"
- @${CC} -o $@ ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${ALL_LDFLAGS}
+ ${SILENTECHO} " LINK $@"
+ ${SILENTCMD}${CC} -o $@ ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${ALL_LDFLAGS}
endif
# build shared and static libpiano
libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBPIANO_OBJ}
- @echo " LINK $@"
- @${CC} -shared -Wl,-soname,libpiano.so.0 -o libpiano.so.0.0.0 \
+ ${SILENTECHO} " LINK $@"
+ ${SILENTCMD}${CC} -shared -Wl,-soname,libpiano.so.0 -o libpiano.so.0.0.0 \
${LIBPIANO_RELOBJ} ${ALL_LDFLAGS}
- @ln -fs libpiano.so.0.0.0 libpiano.so.0
- @ln -fs libpiano.so.0 libpiano.so
- @echo " AR libpiano.a"
- @${AR} rcs libpiano.a ${LIBPIANO_OBJ}
+ ${SILENTCMD}ln -fs libpiano.so.0.0.0 libpiano.so.0
+ ${SILENTCMD}ln -fs libpiano.so.0 libpiano.so
+ ${SILENTECHO} " AR libpiano.a"
+ ${SILENTCMD}${AR} rcs libpiano.a ${LIBPIANO_OBJ}
-include $(PIANOBAR_SRC:.c=.d)
@@ -111,17 +119,17 @@ libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBPIANO_OBJ}
# build standard object files
%.o: %.c
- @echo " CC $<"
- @${CC} -c -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<
+ ${SILENTECHO} " CC $<"
+ ${SILENTCMD}${CC} -c -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<
# create position independent code (for shared libraries)
%.lo: %.c
- @echo " CC $< (PIC)"
- @${CC} -c -fPIC -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<
+ ${SILENTECHO} " CC $< (PIC)"
+ ${SILENTCMD}${CC} -c -fPIC -o $@ ${ALL_CFLAGS} -MMD -MF $*.d -MP $<
clean:
- @echo " CLEAN"
- @${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \
+ ${SILENTECHO} " CLEAN"
+ ${SILENTCMD}${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \
${LIBPIANO_RELOBJ} pianobar libpiano.so* \
libpiano.a $(PIANOBAR_SRC:.c=.d) $(LIBPIANO_SRC:.c=.d)