--- Makefile.orig 2016-10-13 09:55:48 UTC +++ Makefile @@ -5,17 +5,9 @@ BSDCONV_PATH?=${PREFIX} CFLAGS+=-O2 -Wall -D_BSDCONV_INTERNAL -DPREFIX='"${PREFIX}"' -DBSDCONV_PATH='"${BSDCONV_PATH}"' SHLIBVER=11 -UNAME_S=$(shell uname -s) -ifeq (${UNAME_S}, Darwin) -SHLIBNAME=libbsdconv.so -else SHLIBNAME=libbsdconv.so.${SHLIBVER} -endif LIBS?= -ifeq (${UNAME_S}, Linux) -LIBS+=-ldl -endif TODO_FILTERS= TODO_FILTERS+=ANSI @@ -262,7 +254,7 @@ installdir: mkdir -p ${DESTDIR}${PREFIX}/share/bsdconv/to libbsdconv: src/libbsdconv*.c src/bsdconv.h | builddir - $(CC) ${CFLAGS} src/libbsdconv.c -fPIC -shared -o build/lib/${SHLIBNAME} ${LIBS} + $(CC) ${CFLAGS} src/libbsdconv.c -fPIC -shared -Wl,-soname,${SHLIBNAME} -o build/lib/${SHLIBNAME} ${LIBS} bsdconv: libbsdconv meta src/bsdconv.h src/bsdconv.c | builddir $(CC) ${CFLAGS} src/bsdconv.c -L./build/lib/ -o build/bin/bsdconv -lbsdconv ${LIBS} @@ -334,12 +326,12 @@ clean: install: install_main install_filters install_scorers install_basic install_chinese install_ebcdic install_main: | installdir - install -m 555 build/bin/bsdconv ${DESTDIR}${PREFIX}/bin - install -m 555 build/bin/bsdconv-man ${DESTDIR}${PREFIX}/bin - install -m 555 build/bin/bsdconv-mktable ${DESTDIR}${PREFIX}/bin - install -m 555 build/bin/bsdconv-completion ${DESTDIR}${PREFIX}/bin + install ${STRIP} -m 555 build/bin/bsdconv ${DESTDIR}${PREFIX}/bin + install ${STRIP} -m 555 build/bin/bsdconv-man ${DESTDIR}${PREFIX}/bin + install ${STRIP} -m 555 build/bin/bsdconv-mktable ${DESTDIR}${PREFIX}/bin + install ${STRIP} -m 555 build/bin/bsdconv-completion ${DESTDIR}${PREFIX}/bin install -m 444 build/include/bsdconv.h ${DESTDIR}${PREFIX}/include - install -m 444 build/lib/${SHLIBNAME} ${DESTDIR}${PREFIX}/lib + install ${STRIP} -m 444 build/lib/${SHLIBNAME} ${DESTDIR}${PREFIX}/lib install -m 444 build/share/bsdconv/from/alias ${DESTDIR}${PREFIX}/share/bsdconv/from/alias install -m 444 build/share/bsdconv/inter/alias ${DESTDIR}${PREFIX}/share/bsdconv/inter/alias install -m 444 build/share/bsdconv/to/alias ${DESTDIR}${PREFIX}/share/bsdconv/to/alias @@ -350,13 +342,13 @@ install_main: | installdir install_filters: | installdir for item in ${TODO_FILTERS} ; do \ - install -m 444 build/share/bsdconv/filter/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/filter/$${item}.so ; \ + install ${STRIP} -m 444 build/share/bsdconv/filter/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/filter/$${item}.so ; \ if [ -e build/share/bsdconv/filter/$${item}.man ]; then install -m 444 build/share/bsdconv/filter/$${item}.man ${DESTDIR}${PREFIX}/share/bsdconv/filter/$${item}.man ; fi ; \ done install_scorers: | installdir for item in ${TODO_SCORERS} ; do \ - install -m 444 build/share/bsdconv/scorer/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/scorer/$${item}.so ; \ + install ${STRIP} -m 444 build/share/bsdconv/scorer/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/scorer/$${item}.so ; \ if [ -e build/share/bsdconv/scorer/$${item}.man ]; then install -m 444 build/share/bsdconv/scorer/$${item}.man ${DESTDIR}${PREFIX}/share/bsdconv/scorer/$${item}.man ; fi ; \ done @@ -364,21 +356,21 @@ install_basic: | installdir for item in ${TODO_CODECS_BASIC} ; do \ install -m 444 build/share/bsdconv/$${item} ${DESTDIR}${PREFIX}/share/bsdconv/$${item} ; \ if [ -e build/share/bsdconv/$${item}.man ]; then install -m 444 build/share/bsdconv/$${item}.man ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.man ; fi ; \ - if [ -e build/share/bsdconv/$${item}.so ]; then install -m 444 build/share/bsdconv/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.so ; fi ; \ + if [ -e build/share/bsdconv/$${item}.so ]; then install ${STRIP} -m 444 build/share/bsdconv/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.so ; fi ; \ done install_chinese: | installdir for item in ${TODO_CODECS_CHINESE} ; do \ install -m 444 build/share/bsdconv/$${item} ${DESTDIR}${PREFIX}/share/bsdconv/$${item} ; \ if [ -e build/share/bsdconv/$${item}.man ]; then install -m 444 build/share/bsdconv/$${item}.man ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.man ; fi ; \ - if [ -e build/share/bsdconv/$${item}.so ]; then install -m 444 build/share/bsdconv/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.so ; fi ; \ + if [ -e build/share/bsdconv/$${item}.so ]; then install ${STRIP} -m 444 build/share/bsdconv/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.so ; fi ; \ done install_ebcdic: | installdir for item in ${TODO_CODECS_EBCDIC} ; do \ install -m 444 build/share/bsdconv/$${item} ${DESTDIR}${PREFIX}/share/bsdconv/$${item} ; \ if [ -e build/share/bsdconv/$${item}.man ]; then install -m 444 build/share/bsdconv/$${item}.man ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.man ; fi ; \ - if [ -e build/share/bsdconv/$${item}.so ]; then install -m 444 build/share/bsdconv/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.so ; fi ; \ + if [ -e build/share/bsdconv/$${item}.so ]; then install ${STRIP} -m 444 build/share/bsdconv/$${item}.so ${DESTDIR}${PREFIX}/share/bsdconv/$${item}.so ; fi ; \ done build_doc: build_doc_tex build_doc_sphinx