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