dylib-common.mk 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # -*-makefile-*- <-- an Emacs control
  2. # See unix-common.mk for an explanation of this file. This file is
  3. # analogous to unix-common.mk, but is for an Irix system.
  4. SONAME = $(@:%.$(MIN)=%)
  5. SHLIB_CMD = $(CCLD) $(LADD) $(LDFLAGS_SHLIB) -o $@ $^
  6. SHLIBPP_CMD = $(CXXLD) $(LADD) $(LDFLAGS_SHLIB) -o $@ $^
  7. SHLIB_LE_TARGETS = $(call shliblefn, $(SHARED_LIBS_TO_BUILD))
  8. $(SHLIB_LE_TARGETS):%.$(SHLIB_SUFFIX):%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)
  9. rm -f $@
  10. $(LN_S) $< $@
  11. .PHONY: $(SHLIB_INSTALL_TARGETS)
  12. .PHONY: install-shared-libraries
  13. SHLIB_INSTALL_TARGETS = $(SHARED_LIBS_TO_INSTALL:%=%/install)
  14. #SHLIB_INSTALL_TARGETS is like "libfoo/install libbar/install"
  15. install-shared-libraries: $(SHLIB_INSTALL_TARGETS)
  16. $(SHLIB_INSTALL_TARGETS):%/install:%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)
  17. # $< is a library file name, e.g. libfoo.so.3.1 .
  18. $(INSTALL_SHLIB) $< $(DESTDIR)$(LIBINST_DIR)/$<
  19. cd $(DESTDIR)$(LIBINST_DIR); \
  20. rm -f $(<:%.$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX)); \
  21. $(LN_S) $< $(<:%.$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX))
  22. cd $(DESTDIR)$(LIBINST_DIR); \
  23. rm -f $(<:%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX)); \
  24. $(LN_S) $(<:%.$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX)) \
  25. $(<:%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX))