Ticket #32896: patch-Makefile.diff

File patch-Makefile.diff, 2.3 KB (added by ryandesign (Ryan Carsten Schmidt), 13 years ago)
  • Makefile

    old new  
    9090
    9191# build pianobar
    9292ifeq (${DYNLINK},1)
    93 pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.so.0
     93pianobar: ${PIANOBAR_OBJ} ${PIANOBAR_HDR} libpiano.0.dylib
    9494        @echo "  LINK  $@"
    9595        @${CC} -o $@ ${PIANOBAR_OBJ} ${LDFLAGS} -lao -lpthread -lm -L. -lpiano \
    9696                        ${LIBFAAD_LDFLAGS} ${LIBMAD_LDFLAGS} ${LIBGNUTLS_LDFLAGS}
     
    104104endif
    105105
    106106# build shared and static libpiano
    107 libpiano.so.0: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \
     107libpiano.0.dylib: ${LIBPIANO_RELOBJ} ${LIBPIANO_HDR} ${LIBWAITRESS_RELOBJ} \
    108108                ${LIBWAITRESS_HDR} ${LIBEZXML_RELOBJ} ${LIBEZXML_HDR} \
    109109                ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ}
    110110        @echo "  LINK  $@"
    111         @${CC} -shared -Wl,-soname,libpiano.so.0 ${CFLAGS} ${LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
    112                         -o libpiano.so.0.0.0 ${LIBPIANO_RELOBJ} \
     111        @${CC} -dynamiclib -Wl,-install_name,${LIBDIR}/libpiano.0.dylib ${CFLAGS} ${LDFLAGS} ${LIBGNUTLS_LDFLAGS} \
     112                        -o libpiano.0.0.0.dylib ${LIBPIANO_RELOBJ} \
    113113                        ${LIBWAITRESS_RELOBJ} ${LIBEZXML_RELOBJ}
    114         @ln -s libpiano.so.0.0.0 libpiano.so.0
    115         @ln -s libpiano.so.0 libpiano.so
     114        @ln -s libpiano.0.0.0.dylib libpiano.0.dylib
     115        @ln -s libpiano.0.dylib libpiano.dylib
    116116        @echo "    AR  libpiano.a"
    117117        @${AR} rcs libpiano.a ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBEZXML_OBJ}
    118118
     
    132132        @echo " CLEAN"
    133133        @${RM} ${PIANOBAR_OBJ} ${LIBPIANO_OBJ} ${LIBWAITRESS_OBJ} ${LIBWAITRESS_OBJ}/test.o \
    134134                        ${LIBEZXML_OBJ} ${LIBPIANO_RELOBJ} ${LIBWAITRESS_RELOBJ} \
    135                         ${LIBEZXML_RELOBJ} pianobar libpiano.so* libpiano.a waitress-test
     135                        ${LIBEZXML_RELOBJ} pianobar libpiano*.dylib libpiano.a waitress-test
    136136
    137137all: pianobar
    138138
     
    183183
    184184install-libpiano:
    185185        install -d ${DESTDIR}/${LIBDIR}/
    186         install -m644 libpiano.so.0.0.0 ${DESTDIR}/${LIBDIR}/
    187         ln -s libpiano.so.0.0.0 ${DESTDIR}/${LIBDIR}/libpiano.so.0
    188         ln -s libpiano.so.0 ${DESTDIR}/${LIBDIR}/libpiano.so
     186        install -m644 libpiano.0.0.0.dylib ${DESTDIR}/${LIBDIR}/
     187        ln -s libpiano.0.0.0.dylib ${DESTDIR}/${LIBDIR}/libpiano.0.dylib
     188        ln -s libpiano.0.dylib ${DESTDIR}/${LIBDIR}/libpiano.dylib
    189189        install -m644 libpiano.a ${DESTDIR}/${LIBDIR}/
    190190        install -d ${DESTDIR}/${INCDIR}/
    191191        install -m644 src/libpiano/piano.h ${DESTDIR}/${INCDIR}/