Ticket #43579: patch-Makefile.diff

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

    old new  
    1818CPPFLAGS += "-DVERSION_MINOR=${VERSION_MINOR}"
    1919CPPFLAGS += "-DVERSION_REV=${VERSION_REV}"
    2020
    21 all: options ${PLUGIN}.so
     21all: options ${PLUGIN}.dylib
    2222
    2323zathura-version-check:
    2424ifneq ($(ZATHURA_VERSION_CHECK), 0)
     
    4646${OBJECTS}:  config.mk zathura-version-check
    4747${DOBJECTS}: config.mk zathura-version-check
    4848
    49 ${PLUGIN}.so: ${OBJECTS}
     49${PLUGIN}.dylib: ${OBJECTS}
    5050        $(ECHO) LD $@
    51         $(QUIET)${CC} -shared ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS}
     51        $(QUIET)${CC} -Wl,-dylib_install_name,${DESTDIR}${PLUGINDIR}/pdf.dylib -Wl,-undefined,dynamic_lookup -dynamiclib -current_version ${VERSION} -compatibility_version ${VERSION} ${LDFLAGS} -o $@ ${OBJECTS} ${LIBS}
    5252
    5353${PLUGIN}-debug.so: ${DOBJECTS}
    5454        $(ECHO) LD $@
    5555        $(QUIET)${CC} -shared ${LDFLAGS} -o $@ ${DOBJECTS} ${LIBS}
    5656
    5757clean:
    58         $(QUIET)rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so $(PLUGIN)-debug.so \
     58        $(QUIET)rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).dylib $(PLUGIN)-debug.so \
    5959                doc .depend ${PROJECT}-${VERSION}.tar.gz zathura-version-check
    6060
    6161debug: options ${PLUGIN}-debug.so
     
    7575install: all
    7676        $(ECHO) installing ${PLUGIN} plugin
    7777        $(QUIET)mkdir -p ${DESTDIR}${PLUGINDIR}
    78         $(QUIET)cp -f ${PLUGIN}.so ${DESTDIR}${PLUGINDIR}
     78        $(QUIET)cp -f ${PLUGIN}.dylib ${DESTDIR}${PLUGINDIR}
    7979        $(QUIET)mkdir -m 755 -p ${DESTDIR}${DESKTOPPREFIX}
    8080        $(ECHO) installing desktop file
    8181        $(QUIET)install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX}
    8282
    8383uninstall:
    8484        $(ECHO) uninstalling ${PLUGIN} plugin
    85         $(QUIET)rm -f ${DESTDIR}${PLUGINDIR}/${PLUGIN}.so
    86         $(QUIET)rmdir --ignore-fail-on-non-empty ${DESTDIR}${PLUGINDIR} 2> /dev/null
     85        $(QUIET)rm -f ${DESTDIR}${PLUGINDIR}/${PLUGIN}.dylib
     86        $(QUIET)rmdir ${DESTDIR}${PLUGINDIR} 2> /dev/null
    8787        $(ECHO) removing desktop file
    8888        $(QUIET)rm -f ${DESTDIR}${DESKTOPPREFIX}/${PROJECT}.desktop
    89         $(QUIET)rmdir --ignore-fail-on-non-empty ${DESTDIR}${DESKTOPPREFIX} 2> /dev/null
     89        $(QUIET)rmdir ${DESTDIR}${DESKTOPPREFIX} 2> /dev/null
    9090
    9191-include $(wildcard .depend/*.dep)
    9292