From 63c86dce1e248aa03a99792f56077dc176bcd295 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 27 Apr 2012 15:15:40 +0200 Subject: piano: Move to JSON API (v5) In random order: Thanks to Chris Eby for his work on pithos, to an anonymous coward for sending me his Android client, to Alex Howard for sending me the webOS client, to ZigZagJoe for providing a temporary fix and thanks to everyone who sent Pandora a message. Although there are a few rough edges here and there this fixes #236. --- Makefile | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3bfd7fe..b503e7f 100644 --- a/Makefile +++ b/Makefile @@ -39,12 +39,10 @@ PIANOBAR_OBJ=${PIANOBAR_SRC:.c=.o} LIBPIANO_DIR=src/libpiano LIBPIANO_SRC=\ ${LIBPIANO_DIR}/crypt.c \ - ${LIBPIANO_DIR}/piano.c \ - ${LIBPIANO_DIR}/xml.c + ${LIBPIANO_DIR}/piano.c LIBPIANO_HDR=\ ${LIBPIANO_DIR}/config.h \ ${LIBPIANO_DIR}/crypt_key_output.h \ - ${LIBPIANO_DIR}/xml.h \ ${LIBPIANO_DIR}/crypt.h \ ${LIBPIANO_DIR}/piano.h \ ${LIBPIANO_DIR}/crypt_key_input.h \ @@ -62,13 +60,6 @@ LIBWAITRESS_OBJ=${LIBWAITRESS_SRC:.c=.o} LIBWAITRESS_RELOBJ=${LIBWAITRESS_SRC:.c=.lo} LIBWAITRESS_INCLUDE=${LIBWAITRESS_DIR} -LIBEZXML_DIR=src/libezxml -LIBEZXML_SRC=${LIBEZXML_DIR}/ezxml.c -LIBEZXML_HDR=${LIBEZXML_DIR}/ezxml.h -LIBEZXML_OBJ=${LIBEZXML_SRC:.c=.o} -LIBEZXML_RELOBJ=${LIBEZXML_SRC:.c=.lo} -LIBEZXML_INCLUDE=${LIBEZXML_DIR} - ifeq (${DISABLE_FAAD}, 1) LIBFAAD_CFLAGS= LIBFAAD_LDFLAGS= @@ -88,51 +79,59 @@ endif LIBGNUTLS_CFLAGS= LIBGNUTLS_LDFLAGS=-lgnutls +LIBGCRYPT_CFLAGS= +LIBGCRYPT_LDFLAGS=-lgcrypt + +LIBJSONC_CFLAGS=$(shell pkg-config --cflags json) +LIBJSONC_LDFLAGS=$(shell pkg-config --libs json) + # build pianobar ifeq (${DYNLINK},1) pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0 @echo " LINK $@" @${CC} -o $@ ${PIANOBAR_OBJ} ${LDFLAGS} -lao -lpthread -lm -L. -lpiano \ - ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} + ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} \ + ${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS} else pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} \ - ${LIBWAITRESS_HDR} ${LIBEZXML_OBJ} ${LIBEZXML_HDR} + ${LIBWAITRESS_HDR} @echo " LINK $@" @${CC} ${CFLAGS} ${LDFLAGS} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} \ - ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} -lao -lpthread -lm \ - ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} -o $@ + ${LIBWAITRESS_OBJ} -lao -lpthread -lm \ + ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS} \ + ${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS} -o $@ endif # build shared and static libpiano libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \ - ${LIBWAITRESS_HDR} ${LIBEZXML_RELOBJ} ${LIBEZXML_HDR} \ - ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} + ${LIBWAITRESS_HDR} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} @echo " LINK $@" - @${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} ${LIBGNUTLS_LDFLAGS} \ + @${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} \ + ${LIBGNUTLS_LDFLAGS} ${LIBGCRYPT_LDFLAGS} \ -o libpiano.so.0.0.0 ${LIBPIANO_RELOBJ} \ - ${LIBWAITRESS_RELOBJ} ${LIBEZXML_RELOBJ} + ${LIBWAITRESS_RELOBJ} @ln -s libpiano.so.0.0.0 libpiano.so.0 @ln -s libpiano.so.0 libpiano.so @echo " AR libpiano.a" - @${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ} + @${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} %.o: %.c @echo " CC $<" @${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \ - -I ${LIBEZXML_INCLUDE} ${LIBFAAD_CFLAGS} \ - ${LIBMAD_CFLAGS} ${LIBGNUTLS_CFLAGS} -c -o $@ $< + ${LIBFAAD_CFLAGS} ${LIBMAD_CFLAGS} ${LIBGNUTLS_CFLAGS} \ + ${LIBJSONC_CFLAGS} -c -o $@ $< # create position independent code (for shared libraries) %.lo: %.c @echo " CC $< (PIC)" @${CC} ${CFLAGS} -I ${LIBPIANO_INCLUDE} -I ${LIBWAITRESS_INCLUDE} \ - -I ${LIBEZXML_INCLUDE} -c -fPIC -o $@ $< + -c -fPIC -o $@ $< clean: @echo " CLEAN" @${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBWAITRESS_OBJ}/test.o \ - ${LIBEZXML_OBJ} ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} \ - ${LIBEZXML_RELOBJ} pianobar libpiano.so* libpiano.a waitress-test + ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} pianobar libpiano.so* \ + libpiano.a waitress-test all: pianobar -- cgit v1.2.3