Ticket #43564: patch-Makefile.diff

File patch-Makefile.diff, 2.8 KB (added by harciga, 11 years ago)
  • Makefile

    old new  
    6767
    6868lib${PROJECT}.so.${SOVERSION}: ${OBJECTS}
    6969        $(ECHO) LD $@
    70         $(QUIET)${CC} -Wl,-soname,lib${PROJECT}.so.${SOMAJOR} -shared ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS}
     70        $(QUIET)${CC} -Wl,-dylib_install_name,${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib -dynamiclib -current_version ${SOVERSION} -compatibility_version ${SOMAJOR} ${LDFLAGS} -o lib${PROJECT}.${SOVERSION}.dylib ${OBJECTS} ${LIBS}
    7171
    7272clean:
    7373        $(QUIET)rm -rf ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
    7474                ${DOBJECTS} lib${PROJECT}.a lib${PROJECT}-debug.a ${PROJECT}.pc doc \
    7575                lib$(PROJECT).so.${SOVERSION} lib${PROJECT}-debug.so.${SOVERSION} .depend \
    7676                ${PROJECTNV}-${VERSION}.tar.gz version.h *gcda *gcno $(PROJECT).info gcov \
    77                 .version-checks
     77                lib${PROJECT}.${SOVERSION}.dylib .version-checks
    7878        $(QUIET)${MAKE} -C tests clean
    7979        $(QUIET)${MAKE} -C po clean
    8080
     
    8686
    8787lib${PROJECT}-debug.so.${SOVERSION}: ${DOBJECTS}
    8888        $(ECHO) LD $@
    89         $(QUIET)${CC} -Wl,-soname,lib${PROJECT}.so.${SOMAJOR} -shared ${LDFLAGS} -o $@ ${DOBJECTS} ${LIBS}
     89        $(QUIET)${CC} -Wl,-dylib_install_name,${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib -dynamiclib -current_version ${SOVERSION} -compatibility_version ${SOMAJOR} ${LDFLAGS} -o lib${PROJECT}.${SOVERSION}.dylib ${DOBJECTS} ${LIBS}
    9090
    9191debug: options ${PROJECT}-debug
    9292
     
    139139install-shared: shared
    140140        $(ECHO) installing shared library
    141141        $(QUIET)mkdir -m 755 -p ${DESTDIR}${LIBDIR}
    142         $(QUIET)install -m 644 lib${PROJECT}.so.${SOVERSION} ${DESTDIR}${LIBDIR}
    143         $(QUIET)ln -sf lib${PROJECT}.so.${SOVERSION} ${DESTDIR}${LIBDIR}/lib${PROJECT}.so.${SOMAJOR} || \
     142        $(QUIET)install -m 644 lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}
     143        $(QUIET)ln -sf lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib || \
    144144                echo "Failed to create lib${PROJECT}.so.${SOMAJOR}. Please check if it exists and points to the correct version of lib${PROJECT}.so."
    145         $(QUIET)ln -sf lib${PROJECT}.so.${SOVERSION} ${DESTDIR}${LIBDIR}/lib${PROJECT}.so || \
     145        $(QUIET)ln -sf lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}/lib${PROJECT}.dylib || \
    146146                echo "Failed to create lib${PROJECT}.so. Please check if it exists and points to the correct version of lib${PROJECT}.so."
    147147
    148148install: options po install-static install-shared install-headers
     
    159159uninstall: uninstall-headers
    160160        $(ECHO) removing library file
    161161        $(QUIET)rm -f ${LIBDIR}/lib${PROJECT}.a ${LIBDIR}/lib${PROJECT}.so.${SOVERSION} \
    162                 ${LIBDIR}/lib${PROJECT}.so.${SOMAJOR} ${LIBDIR}/lib${PROJECT}.so
     162                ${LIBDIR}/lib${PROJECT}.so.${SOMAJOR} ${LIBDIR}/lib${PROJECT}.so \
     163                ${LIBDIR}/lib${PROJECT}.${SOVERSION}.dylib \
     164                ${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib ${LIBDIR}/lib${PROJECT}.dylib
    163165        $(QUIET)${MAKE} -C po uninstall
    164166
    165167uninstall-headers: