Ticket #47853: patch-Makefile.diff
File patch-Makefile.diff, 4.5 KB (added by harciga, 9 years ago) |
---|
-
Makefile
old new 41 41 ifeq ($(UNAME), Darwin) 42 42 SONAME_FLAG = -install_name 43 43 SHARED_FLAG = -dynamiclib 44 OSX_FLAGS = -current_version ${SOVERSION} -compatibility_version ${SOMAJOR} 44 45 endif 45 46 46 47 all: ${PROJECTNV} ${BUILDDIR}/${PROJECT}.pc po … … 111 112 @mkdir -p ${BUILDDIR_RELEASE}/${BINDIR} 112 113 $(QUIET)ar rcs $@ ${OBJECTS} 113 114 114 ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}. so.${SOVERSION}: ${OBJECTS}115 ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.${SOVERSION}.dylib: ${OBJECTS} 115 116 $(call colorecho,LD,$@) 116 117 @mkdir -p ${BUILDDIR_RELEASE}/${BINDIR} 117 $(QUIET)${CC} -Wl,${SONAME_FLAG}, lib${PROJECT}.so.${SOMAJOR}\118 ${SHARED_FLAG} ${ LDFLAGS} -o $@ ${OBJECTS} ${LIBS}118 $(QUIET)${CC} -Wl,${SONAME_FLAG},${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib \ 119 ${SHARED_FLAG} ${OSX_FLAGS} ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS} 119 120 120 121 ${PROJECT}: static shared 121 122 ${PROJECTNV}: ${PROJECT} 122 123 static: ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.a 123 shared: ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}. so.${SOVERSION}124 shared: ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.${SOVERSION}.dylib 124 125 release: ${PROJECT} 125 126 126 127 # debug build … … 142 143 @mkdir -p ${BUILDDIR_DEBUG}/${BINDIR} 143 144 $(QUIET)${AR} rcs $@ ${OBJECTS_DEBUG} 144 145 145 ${BUILDDIR_DEBUG}/${BINDIR}/lib${PROJECT}. so.${SOVERSION}: ${OBJECTS_DEBUG}146 ${BUILDDIR_DEBUG}/${BINDIR}/lib${PROJECT}.${SOVERSION}.dylib: ${OBJECTS_DEBUG} 146 147 $(call colorecho,LD,$@) 147 148 @mkdir -p ${BUILDDIR_DEBUG}/${BINDIR} 148 $(QUIET)${CC} -Wl,${SONAME_FLAG}, lib${PROJECT}.so.${SOMAJOR} ${SHARED_FLAG} ${LDFLAGS} -o $@ ${OBJECTS_DEBUG} ${LIBS}149 $(QUIET)${CC} -Wl,${SONAME_FLAG},${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib ${SHARED_FLAG} ${OSX_FLAGS} ${LDFLAGS} -o $@ ${OBJECTS_DEBUG} ${LIBS} 149 150 150 151 ${PROJECT}-debug: \ 151 152 ${BUILDDIR_DEBUG}/${BINDIR}/lib${PROJECT}.a \ 152 ${BUILDDIR_DEBUG}/${BINDIR}/lib${PROJECT}. so.${SOVERSION}153 ${BUILDDIR_DEBUG}/${BINDIR}/lib${PROJECT}.${SOVERSION}.dylib 153 154 debug: ${PROJECT}-debug 154 155 155 156 # gcov build … … 171 172 @mkdir -p ${BUILDDIR_GCOV}/${BINDIR} 172 173 $(QUIET)${AR} rcs $@ ${OBJECTS_GCOV} 173 174 174 ${BUILDDIR_GCOV}/${BINDIR}/lib${PROJECT}. so.${SOVERSION}: ${OBJECTS_GCOV}175 ${BUILDDIR_GCOV}/${BINDIR}/lib${PROJECT}.${SOVERSION}.dylib: ${OBJECTS_GCOV} 175 176 $(call colorecho,LD,$@) 176 177 @mkdir -p ${BUILDDIR_GCOV}/${BINDIR} 177 $(QUIET)${CC} -Wl,${SONAME_FLAG}, lib${PROJECT}.so.${SOMAJOR}${SHARED_FLAG} \178 ${ GCOV_LDFLAGS} -o $@ ${OBJECTS_GCOV} ${LIBS}178 $(QUIET)${CC} -Wl,${SONAME_FLAG},${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib ${SHARED_FLAG} \ 179 ${OSX_FLAGS} ${GCOV_LDFLAGS} -o $@ ${OBJECTS_GCOV} ${LIBS} 179 180 180 181 ${PROJECT}-gcov: ${BUILDDIR_GCOV}/${BINDIR}/lib${PROJECT}.a 181 182 gcov: ${PROJECT}-gcov … … 245 246 install-shared: shared 246 247 $(call colorecho,INSTALL,"Install shared library") 247 248 $(QUIET)mkdir -m 755 -p ${DESTDIR}${LIBDIR} 248 $(QUIET)install -m 644 ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}. so.${SOVERSION}${DESTDIR}${LIBDIR}249 $(QUIET)ln -sf lib${PROJECT}. so.${SOVERSION} ${DESTDIR}${LIBDIR}/lib${PROJECT}.so.${SOMAJOR}|| \250 echo "Failed to create lib${PROJECT}. so.${SOMAJOR}. Please check if it exists and points to the correct version of lib${PROJECT}.so."251 $(QUIET)ln -sf lib${PROJECT}. so.${SOVERSION} ${DESTDIR}${LIBDIR}/lib${PROJECT}.so|| \252 echo "Failed to create lib${PROJECT}. so. Please check if it exists and points to the correct version of lib${PROJECT}.so."249 $(QUIET)install -m 644 ${BUILDDIR_RELEASE}/${BINDIR}/lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR} 250 $(QUIET)ln -sf lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib || \ 251 echo "Failed to create lib${PROJECT}.${SOMAJOR}.dylib. Please check if it exists and points to the correct version of lib${PROJECT}.dylib" 252 $(QUIET)ln -sf lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}/lib${PROJECT}.dylib || \ 253 echo "Failed to create lib${PROJECT}.dylib. Please check if it exists and points to the correct version of lib${PROJECT}.dylib." 253 254 254 255 install-headers: ${PROJECTNV}/version.h ${BUILDDIR}/${PROJECT}.pc 255 256 $(call colorecho,INSTALL,"Install pkg-config file") … … 268 269 269 270 uninstall: uninstall-headers 270 271 $(call colorecho,UNINSTALL,"Remove library files") 271 $(QUIET)rm -f ${LIBDIR}/lib${PROJECT}.a ${LIBDIR}/lib${PROJECT}. so.${SOVERSION}\272 ${LIBDIR}/lib${PROJECT}. so.${SOMAJOR} ${LIBDIR}/lib${PROJECT}.so272 $(QUIET)rm -f ${LIBDIR}/lib${PROJECT}.a ${LIBDIR}/lib${PROJECT}.${SOVERSION}.dylib \ 273 ${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib ${LIBDIR}/lib${PROJECT}.dylib 273 274 $(QUIET)${MAKE} -C po uninstall 274 275 275 276 uninstall-headers: