1. 程式人生 > >編譯ffmpeg的so庫,不帶版本號字尾

編譯ffmpeg的so庫,不帶版本號字尾

asking questions leads always to finding answers. that's why i was successful, digging into the make files helped. do the following:

  • run your configuration
  • find "config.mak"
  • change

    SLIBNAME_WITH_VERSION=$(SLIBNAME).$(LIBVERSION) SLIBNAME_WITH_MAJOR=$(SLIBNAME).$(LIBMAJOR)

    to:

    SLIBNAME_WITH_VERSION=$(SLIBNAME)
    SLIBNAME_WITH_MAJOR=$(SLIBNAME)

  • change

    SLIB_INSTALL_NAME=$(SLIBNAME_WITH_VERSION) SLIB_INSTALL_LINKS=$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)

    to:

    SLIB_INSTALL_NAME=$(SLIBNAME)
    SLIB_INSTALL_LINKS=

  • run "make" or "make -j$(nproc)"

  • "make install"

now you will have shared libraries without suffixes.
you can check their dependencies by "readelf -d somefile.so"