ace.mk 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. ################################################################################
  2. #
  3. # ace
  4. #
  5. ################################################################################
  6. ACE_VERSION = 7.1.1
  7. ACE_SOURCE = ACE-$(ACE_VERSION).tar.bz2
  8. ACE_SITE = http://download.dre.vanderbilt.edu/previous_versions
  9. ACE_LICENSE = DOC
  10. ACE_LICENSE_FILES = COPYING
  11. ACE_INSTALL_STAGING = YES
  12. ACE_CPE_ID_VENDOR = vanderbilt
  13. ACE_CPE_ID_PRODUCT = adaptive_communication_environment
  14. # Note: We are excluding examples, apps and tests
  15. # Only compiling ACE libraries (no TAO)
  16. ACE_LIBRARIES = ace ACEXML Kokyu netsvcs protocols/ace
  17. ACE_CPPFLAGS = $(TARGET_CPPFLAGS) -std=c++14
  18. ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y)
  19. ACE_CPPFLAGS += -O0
  20. endif
  21. # ACE uses DEFFLAGS as C++ pre-processor flags, and CCFLAGS as the C++ flags.
  22. # Ace passes the pre-processor flags after the C++ flags, so we pass our
  23. # C++ flags as pre-processor flags, via DEFFLAGS.
  24. ACE_MAKE_OPTS = \
  25. ACE_ROOT="$(@D)" \
  26. DEFFLAGS="$(ACE_CPPFLAGS)"
  27. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  28. ACE_LIBRARIES += ace/SSL
  29. ACE_DEPENDENCIES += openssl
  30. define ACE_CONFIGURE_SSL
  31. echo "ssl = 1" >> $(@D)/include/makeinclude/platform_macros.GNU
  32. endef
  33. endif
  34. # configure the target build
  35. # refer: http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/ACE-INSTALL.html#unix
  36. define ACE_CONFIGURE_CMDS
  37. # create a config file
  38. echo ' #include "ace/config-linux.h" ' >> $(@D)/ace/config.h
  39. # Create platform/compiler-specific Makefile configurations
  40. $(INSTALL) -m 0644 package/ace/platform_macros.GNU $(@D)/include/makeinclude/
  41. $(ACE_CONFIGURE_SSL)
  42. endef
  43. define ACE_BUILD_CMDS
  44. $(foreach lib,$(ACE_LIBRARIES), \
  45. $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$(lib) \
  46. $(ACE_MAKE_OPTS) all
  47. )
  48. endef
  49. define ACE_LIBRARIES_INSTALL
  50. mkdir -p $(1)/usr/share/ace
  51. $(foreach lib,$(ACE_LIBRARIES), \
  52. $(MAKE) -C $(@D)/$(lib) $(ACE_MAKE_OPTS) DESTDIR=$(1) install
  53. )
  54. endef
  55. define ACE_INSTALL_TARGET_CMDS
  56. $(call ACE_LIBRARIES_INSTALL,$(TARGET_DIR))
  57. endef
  58. define ACE_INSTALL_STAGING_CMDS
  59. $(call ACE_LIBRARIES_INSTALL,$(STAGING_DIR))
  60. endef
  61. $(eval $(generic-package))