Ticket #43564: patch-Makefile

File patch-Makefile, 2.8 KB (added by harciga, 11 years ago)
Line 
1--- Makefile    2014-02-17 08:50:37.000000000 -0600
2+++ /Users/harciga/dev/girara/Makefile  2014-05-03 20:40:22.000000000 -0500
3@@ -67,14 +67,14 @@
4 
5 lib${PROJECT}.so.${SOVERSION}: ${OBJECTS}
6        $(ECHO) LD $@
7-       $(QUIET)${CC} -Wl,-soname,lib${PROJECT}.so.${SOMAJOR} -shared ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS}
8+       $(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}
9 
10 clean:
11        $(QUIET)rm -rf ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
12                ${DOBJECTS} lib${PROJECT}.a lib${PROJECT}-debug.a ${PROJECT}.pc doc \
13                lib$(PROJECT).so.${SOVERSION} lib${PROJECT}-debug.so.${SOVERSION} .depend \
14                ${PROJECTNV}-${VERSION}.tar.gz version.h *gcda *gcno $(PROJECT).info gcov \
15-               .version-checks
16+               lib${PROJECT}.${SOVERSION}.dylib .version-checks
17        $(QUIET)${MAKE} -C tests clean
18        $(QUIET)${MAKE} -C po clean
19 
20@@ -86,7 +86,7 @@
21 
22 lib${PROJECT}-debug.so.${SOVERSION}: ${DOBJECTS}
23        $(ECHO) LD $@
24-       $(QUIET)${CC} -Wl,-soname,lib${PROJECT}.so.${SOMAJOR} -shared ${LDFLAGS} -o $@ ${DOBJECTS} ${LIBS}
25+       $(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}
26 
27 debug: options ${PROJECT}-debug
28 
29@@ -139,10 +139,10 @@
30 install-shared: shared
31        $(ECHO) installing shared library
32        $(QUIET)mkdir -m 755 -p ${DESTDIR}${LIBDIR}
33-       $(QUIET)install -m 644 lib${PROJECT}.so.${SOVERSION} ${DESTDIR}${LIBDIR}
34-       $(QUIET)ln -sf lib${PROJECT}.so.${SOVERSION} ${DESTDIR}${LIBDIR}/lib${PROJECT}.so.${SOMAJOR} || \
35+       $(QUIET)install -m 644 lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}
36+       $(QUIET)ln -sf lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib || \
37                echo "Failed to create lib${PROJECT}.so.${SOMAJOR}. Please check if it exists and points to the correct version of lib${PROJECT}.so."
38-       $(QUIET)ln -sf lib${PROJECT}.so.${SOVERSION} ${DESTDIR}${LIBDIR}/lib${PROJECT}.so || \
39+       $(QUIET)ln -sf lib${PROJECT}.${SOVERSION}.dylib ${DESTDIR}${LIBDIR}/lib${PROJECT}.dylib || \
40                echo "Failed to create lib${PROJECT}.so. Please check if it exists and points to the correct version of lib${PROJECT}.so."
41 
42 install: options po install-static install-shared install-headers
43@@ -159,7 +159,9 @@
44 uninstall: uninstall-headers
45        $(ECHO) removing library file
46        $(QUIET)rm -f ${LIBDIR}/lib${PROJECT}.a ${LIBDIR}/lib${PROJECT}.so.${SOVERSION} \
47-               ${LIBDIR}/lib${PROJECT}.so.${SOMAJOR} ${LIBDIR}/lib${PROJECT}.so
48+               ${LIBDIR}/lib${PROJECT}.so.${SOMAJOR} ${LIBDIR}/lib${PROJECT}.so \
49+               ${LIBDIR}/lib${PROJECT}.${SOVERSION}.dylib \
50+               ${LIBDIR}/lib${PROJECT}.${SOMAJOR}.dylib ${LIBDIR}/lib${PROJECT}.dylib
51        $(QUIET)${MAKE} -C po uninstall
52 
53 uninstall-headers: