libss7.mk 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. ################################################################################
  2. #
  3. # libss7
  4. #
  5. ################################################################################
  6. LIBSS7_VERSION = 2.0.0
  7. LIBSS7_SITE = http://downloads.asterisk.org/pub/telephony/libss7/releases
  8. LIBSS7_LICENSE = GPL-2.0
  9. LIBSS7_LICENSE_FILES = LICENSE
  10. LIBSS7_DEPENDENCIES = dahdi-linux dahdi-tools
  11. LIBSS7_INSTALL_STAGING = YES
  12. # The Makefile default rule will always try to generate both libraries.
  13. # So we need to explicitly build only what we can.
  14. ifneq ($(BR2_SHARED_LIBS),y)
  15. LIBSS7_LIBS = libss7.a
  16. define LIBSS7_INSTALL_A
  17. $(INSTALL) -D -m 0644 $(@D)/libss7.a $(1)/usr/lib/libss7.a
  18. endef
  19. endif
  20. ifneq ($(BR2_STATIC_LIBS),y)
  21. LIBSS7_LIBS += libss7.so.2.0
  22. define LIBSS7_INSTALL_SO
  23. $(INSTALL) -D -m 0644 $(@D)/libss7.so.2.0 $(1)/usr/lib/libss7.so.2.0
  24. ln -sf libss7.so.2.0 $(1)/usr/lib/libss7.so
  25. endef
  26. endif
  27. # The Makefile erroneously looks for host headers to decide what utilities
  28. # to build, and thus misses the test utilities. So we explicitly build them
  29. # as they can be useful to validate that the hardware does work.
  30. LIBSS7_UTILS = parser_debug ss7test ss7linktest
  31. define LIBSS7_BUILD_CMDS
  32. $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
  33. CFLAGS="$(TARGET_CFLAGS) -fPIC" -C $(@D) \
  34. $(LIBSS7_LIBS) $(LIBSS7_UTILS)
  35. endef
  36. define LIBSS7_INSTALL_STAGING_CMDS
  37. $(call LIBSS7_INSTALL_A,$(STAGING_DIR))
  38. $(call LIBSS7_INSTALL_SO,$(STAGING_DIR))
  39. $(INSTALL) -D -m 0644 $(@D)/libss7.h $(STAGING_DIR)/usr/include/libss7.h
  40. endef
  41. define LIBSS7_INSTALL_TARGET_CMDS
  42. $(foreach u,$(LIBSS7_UTILS),\
  43. $(INSTALL) -D -m 0755 $(@D)/$(u) $(TARGET_DIR)/usr/sbin/$(u)$(sep))
  44. $(call LIBSS7_INSTALL_SO,$(TARGET_DIR))
  45. endef
  46. $(eval $(generic-package))