2003-01-15 14:36:29 +00:00
|
|
|
|
2008-11-09 17:16:21 +00:00
|
|
|
# This makefile includes all default values used to configure AWS. You can
|
|
|
|
|
# update variables here or set the corresponding variable on the command
|
|
|
|
|
# line. You should not have do change the main makefile.
|
2004-09-30 09:33:12 +00:00
|
|
|
#
|
|
|
|
|
# IMPORTANT: each time you change the definitions here make sure you run
|
|
|
|
|
# $ make setup
|
2005-09-21 13:19:58 +00:00
|
|
|
|
2024-01-18 17:38:45 +01:00
|
|
|
# Is out of tree build
|
|
|
|
|
ifneq ($(BLD_DIR), $(SRC_DIR))
|
|
|
|
|
GPROOTOPTS = --relocate-build-tree=$(BLD_DIR) --root-dir=$(SRC_DIR)
|
|
|
|
|
ISOOT := true
|
|
|
|
|
else
|
|
|
|
|
ISOOT := false
|
|
|
|
|
endif
|
|
|
|
|
|
2024-01-24 18:22:24 +01:00
|
|
|
##############################################################################
|
|
|
|
|
# HOST platform
|
|
|
|
|
HOST := $(shell gcc -dumpmachine)
|
|
|
|
|
|
2009-12-29 21:57:54 +00:00
|
|
|
##############################################################################
|
2012-10-14 16:31:15 +02:00
|
|
|
# TARGET platform
|
2009-12-29 21:57:54 +00:00
|
|
|
#
|
2012-10-14 16:31:15 +02:00
|
|
|
# TARGET is the name for gprbuild --target option
|
2011-01-07 18:11:12 +00:00
|
|
|
#
|
2024-01-24 18:22:24 +01:00
|
|
|
TARGET := $(shell gcc -dumpmachine)
|
2009-12-29 21:58:04 +00:00
|
|
|
|
2018-01-18 12:56:02 +01:00
|
|
|
##############################################################################
|
|
|
|
|
# AWS will be installed under $(prefix). Update this variable to point to
|
|
|
|
|
# the install directory. By default, it is set to the current GNAT root
|
|
|
|
|
# directory to have AWS project files automatically available.
|
|
|
|
|
#
|
|
|
|
|
|
2024-01-24 18:22:24 +01:00
|
|
|
ifeq ($(TARGET), $(HOST))
|
2018-01-18 12:56:02 +01:00
|
|
|
prefix = $(dir $(shell which gnatls))..
|
|
|
|
|
else
|
|
|
|
|
prefix = $(dir $(shell which $(TARGET)-gnatls))..
|
|
|
|
|
endif
|
|
|
|
|
|
2005-10-27 14:40:20 +00:00
|
|
|
##############################################################################
|
2008-05-17 10:52:39 +00:00
|
|
|
# Set to true if the AWS shared runtime must be built. If ENABLE_SHARED is
|
2010-05-02 13:20:03 +00:00
|
|
|
# set to false only the static version is built. The default value is true if
|
2008-05-17 10:52:39 +00:00
|
|
|
# the platform supports shared libraries.
|
2008-01-23 12:38:06 +00:00
|
|
|
#
|
2010-05-02 13:19:56 +00:00
|
|
|
# Note that all dependents libraries (like XML/Ada) must have been compiled
|
|
|
|
|
# and installed as shared libraries if this option is set.
|
|
|
|
|
#
|
2008-05-17 10:52:48 +00:00
|
|
|
# ENABLE_SHARED = [true|false]
|
2005-10-27 14:40:20 +00:00
|
|
|
#
|
2024-01-05 18:11:01 +01:00
|
|
|
ENABLE_SHARED=$(shell gprbuild -c -q -p $(GPROOTOPTS) \
|
2012-10-14 16:31:15 +02:00
|
|
|
-XTARGET=$(TARGET) -XPRJ_TARGET=$(PRJ_TARGET) \
|
2024-01-18 17:38:45 +01:00
|
|
|
-XTGT_DIR=$(TGT_DIR) \
|
2024-01-05 18:11:01 +01:00
|
|
|
-P$(SRC_DIR)/config/setup/test_shared 2>/dev/null \
|
|
|
|
|
&& echo "true")
|
2008-05-17 10:52:39 +00:00
|
|
|
|
2004-09-30 09:33:12 +00:00
|
|
|
##############################################################################
|
2006-11-27 09:14:18 +00:00
|
|
|
# XMLADA optional, needed if you want to build SOAP's AWS support. Set XMLADA
|
|
|
|
|
# to true to activate XML/Ada support, you must also set ADA_PROJECT_PATH
|
2005-09-21 16:50:04 +00:00
|
|
|
# to point to the XML/Ada project files if not installed in the standard
|
|
|
|
|
# location.
|
2008-01-23 12:38:13 +00:00
|
|
|
#
|
2006-11-27 09:14:18 +00:00
|
|
|
# XMLADA = [true/false]
|
2003-10-12 11:00:23 +00:00
|
|
|
#
|
2015-11-27 18:07:34 +01:00
|
|
|
ifeq ($(shell gnat ls -Pxmlada 2>&1 | grep 'project file .* not found'),)
|
2015-03-10 17:42:56 +01:00
|
|
|
XMLADA = true
|
|
|
|
|
else
|
|
|
|
|
XMLADA = false
|
|
|
|
|
endif
|
2004-09-30 09:33:12 +00:00
|
|
|
|
|
|
|
|
##############################################################################
|
2020-02-24 19:46:32 +01:00
|
|
|
# LAL optional, needed if you want to build ada2wsdl tool. This tool can be
|
2020-04-21 10:41:28 +02:00
|
|
|
# used to create a WSDL document from an Ada spec. Set LAL to true to
|
|
|
|
|
# activate LAL support. You must also set ADA_PROJECT_PATH to point to the
|
|
|
|
|
# LAL project files if not installed in the standard location.
|
2005-02-05 07:41:57 +00:00
|
|
|
#
|
2020-04-21 10:41:28 +02:00
|
|
|
# If you activate LAL you also need to activate XMLADA above.
|
2008-01-23 12:38:13 +00:00
|
|
|
#
|
2020-02-24 19:46:32 +01:00
|
|
|
# LAL = [true|false]
|
2005-02-05 07:41:57 +00:00
|
|
|
#
|
2020-02-24 19:46:32 +01:00
|
|
|
ifeq ($(shell gnat ls -Plibadalang 2>&1 | grep 'project file .* not found'),)
|
|
|
|
|
LAL = true
|
2015-03-10 17:42:56 +01:00
|
|
|
else
|
2020-02-24 19:46:32 +01:00
|
|
|
LAL = false
|
2015-03-10 17:42:56 +01:00
|
|
|
endif
|
2003-10-12 11:00:23 +00:00
|
|
|
|
2009-12-15 18:03:40 +00:00
|
|
|
##############################################################################
|
2011-01-09 15:08:24 +00:00
|
|
|
# Zlib mandatory, check if zlib is already installed and recent enought,
|
|
|
|
|
# otherwise compile the one coming with AWS.
|
2009-12-15 18:03:40 +00:00
|
|
|
#
|
|
|
|
|
# ZLIB = [true|false]
|
|
|
|
|
#
|
2024-01-05 18:11:01 +01:00
|
|
|
ZLIB = $(shell gprbuild -q -p $(GPROOTOPTS) \
|
2012-10-14 16:31:15 +02:00
|
|
|
-XTARGET=$(TARGET) -XPRJ_TARGET=$(PRJ_TARGET) \
|
2024-01-18 17:38:45 +01:00
|
|
|
-XTGT_DIR=$(TGT_DIR) \
|
2012-10-14 16:31:15 +02:00
|
|
|
-Pconfig/setup/test_zlib 2>/dev/null \
|
2024-01-05 18:11:01 +01:00
|
|
|
&& $(BLD_DIR)/$(TARGET)/setup/zobj/mzlib \
|
2011-01-09 15:08:24 +00:00
|
|
|
&& echo "true")
|
2009-12-15 18:03:40 +00:00
|
|
|
|
2005-07-02 08:57:25 +00:00
|
|
|
##############################################################################
|
2018-07-09 19:50:13 +06:00
|
|
|
# NETLIB, optional. "gnat" option works on GNAT 20 version ans later. If you
|
2019-01-16 16:12:59 +06:00
|
|
|
# need backward compartibility you can choose either "ipv4" or "ipv6". "ipv4"
|
|
|
|
|
# based on GNAT.Sockets functionality without using new functions. "ipv6"
|
|
|
|
|
# option ipmlementing IPv6 functions without relation to GNAT.Sockets.
|
2005-07-02 08:57:25 +00:00
|
|
|
#
|
2018-07-09 19:50:13 +06:00
|
|
|
# NETLIB = [gnat|ipv6|ipv4]
|
2008-01-23 12:38:13 +00:00
|
|
|
#
|
2018-07-09 19:50:13 +06:00
|
|
|
NETLIB = gnat
|
2005-07-02 08:57:25 +00:00
|
|
|
|
2003-01-23 20:15:22 +00:00
|
|
|
##############################################################################
|
2010-07-04 20:38:27 +00:00
|
|
|
# AWS supports SSL (Secure Socket Layer). To build AWS's with SSL support
|
2012-09-01 11:40:36 +02:00
|
|
|
# you need to set SOCKET to openssl or gnutls, in this case you must have
|
|
|
|
|
# installed the corresponding SSL library on your computer.
|
2008-01-23 12:38:13 +00:00
|
|
|
#
|
2008-05-17 10:52:48 +00:00
|
|
|
# SOCKET = [std|openssl|gnutls]
|
2003-01-15 14:36:29 +00:00
|
|
|
#
|
2007-11-07 20:32:46 +00:00
|
|
|
SOCKET = std
|
2003-01-15 14:36:29 +00:00
|
|
|
|
2022-01-21 13:50:54 +06:00
|
|
|
##############################################################################
|
|
|
|
|
# AWS supports SSL (Secure Socket Layer). To be able to support SSL optionally
|
2022-02-05 19:13:48 +06:00
|
|
|
# at runtime only when appropriate dynamic libraries is available in search
|
|
|
|
|
# path, use this option. This option can be true only when SOCKET option has
|
|
|
|
|
# either "openssl" or "gnutls" value. If this option is true, application
|
|
|
|
|
# linked with AWS can start even if SSL library not found in dynamic library
|
|
|
|
|
# search pathes but runtime exception will be raised in attempt to open secure
|
|
|
|
|
# connection.
|
2022-01-21 13:50:54 +06:00
|
|
|
#
|
|
|
|
|
# SSL_DYNAMIC = [true|false]
|
|
|
|
|
#
|
|
|
|
|
SSL_DYNAMIC = false
|
|
|
|
|
|
2003-02-01 10:54:19 +00:00
|
|
|
##############################################################################
|
2004-04-14 15:54:36 +00:00
|
|
|
# AWS provides a binding to the LDAP API. This binding will use the standard
|
2003-02-01 10:54:19 +00:00
|
|
|
# LDAP DLL provided with Windows OS. On GNU/Linux you need to install OpenLDAP
|
|
|
|
|
# if it is not already installed. If LDAP is installed on your system you can
|
2007-09-25 18:04:42 +00:00
|
|
|
# set LDAP=true below.
|
2007-09-23 07:52:42 +00:00
|
|
|
#
|
2008-05-17 10:52:48 +00:00
|
|
|
# LDAP = [true|false]
|
2008-01-23 12:38:13 +00:00
|
|
|
#
|
2007-09-23 07:52:42 +00:00
|
|
|
LDAP = false
|
2003-02-01 10:54:19 +00:00
|
|
|
|
2003-01-23 20:15:22 +00:00
|
|
|
##############################################################################
|
2003-01-15 14:36:29 +00:00
|
|
|
# To activate the debug mode just uncomment the variable below. This will
|
|
|
|
|
# build AWS with debug information and will output more build information.
|
2008-01-23 12:38:13 +00:00
|
|
|
#
|
2008-05-17 10:52:48 +00:00
|
|
|
# DEBUG = [true|false]
|
2003-01-15 14:36:29 +00:00
|
|
|
#
|
2018-10-09 18:10:27 +02:00
|
|
|
DEBUG = true
|
2003-01-15 14:36:29 +00:00
|
|
|
|
2008-08-08 14:35:06 +00:00
|
|
|
##############################################################################
|
|
|
|
|
# Number of parallel compilations to do.
|
|
|
|
|
#
|
2012-07-27 16:01:51 +02:00
|
|
|
PROCESSORS = 0
|
2008-08-08 14:35:06 +00:00
|
|
|
|
2021-10-30 15:49:44 +02:00
|
|
|
##############################################################################
|
|
|
|
|
# HTTP2 server activated
|
|
|
|
|
#
|
|
|
|
|
SERVER_HTTP2 = $(strip \
|
2023-08-04 12:30:17 +01:00
|
|
|
$(shell sed -n 's/HTTP2_Activated.*:= *\([a-zA-Z]*\);/\1/p' \
|
2024-01-05 18:11:01 +01:00
|
|
|
$(SRC_DIR)/src/core/aws-default.ads | \
|
|
|
|
|
tr '[:upper:]' '[:lower:]'))
|
2021-10-30 15:49:44 +02:00
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
# HTTP2 client activated
|
|
|
|
|
#
|
2023-08-04 12:30:17 +01:00
|
|
|
C_HTTP2 = $(shell sed -n 's/HTTP_Default.* renames *\([a-zA-Z1-9]*\);/\1/p' \
|
2024-01-05 18:11:01 +01:00
|
|
|
$(SRC_DIR)/src/core/aws-client.ads)
|
2021-10-30 15:49:44 +02:00
|
|
|
|
|
|
|
|
ifeq ($(strip $(C_HTTP2)),HTTPv1)
|
|
|
|
|
CLIENT_HTTP2=false
|
|
|
|
|
else
|
|
|
|
|
CLIENT_HTTP2=true
|
|
|
|
|
endif
|
|
|
|
|
|
2003-08-02 08:53:39 +00:00
|
|
|
##############################################################################
|
|
|
|
|
# Tools used by AWS
|
2007-09-22 16:03:35 +00:00
|
|
|
#
|
2004-04-19 09:23:27 +00:00
|
|
|
CP = cp -p
|
2007-09-10 13:52:07 +00:00
|
|
|
GNAT = gnat
|
2009-03-15 20:03:54 +00:00
|
|
|
GPRBUILD = gprbuild
|
|
|
|
|
GPRCLEAN = gprclean
|
2013-11-01 23:42:02 +01:00
|
|
|
GPRINSTALL = gprinstall
|
2018-03-12 10:44:31 +06:00
|
|
|
GPS = gps
|
2005-09-14 13:51:12 +00:00
|
|
|
MKDIR = mkdir -p
|
2008-11-25 13:01:17 +00:00
|
|
|
PYTHON = python
|
2004-04-19 09:23:27 +00:00
|
|
|
RM = rm
|
|
|
|
|
SED = sed
|
2006-11-22 10:33:30 +00:00
|
|
|
|
2012-10-14 16:31:15 +02:00
|
|
|
##############################################################################
|
|
|
|
|
# Load current setup if any
|
|
|
|
|
#
|
2024-01-05 18:11:01 +01:00
|
|
|
-include $(BLD_DIR)/$(TARGET)/makefile.setup
|
2012-10-14 16:31:15 +02:00
|
|
|
# user setup
|
|
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
# Compute PRJ_TARGET which is a simplified set for the TARGET value.
|
|
|
|
|
# It can be UNIX, Darwin, Windows_NT and vxworks.
|
|
|
|
|
#
|
2024-01-24 18:22:24 +01:00
|
|
|
EXEEXT =
|
|
|
|
|
|
2012-10-14 16:31:15 +02:00
|
|
|
ifeq ($(strip $(findstring vxworks, $(TARGET))),vxworks)
|
2024-01-24 18:22:24 +01:00
|
|
|
PRJ_TARGET = vxworks
|
|
|
|
|
OS = UNIX
|
2011-01-07 18:11:12 +00:00
|
|
|
else
|
2012-10-14 16:31:15 +02:00
|
|
|
ifeq ($(strip $(findstring mingw32, $(TARGET))),mingw32)
|
2024-01-24 18:22:24 +01:00
|
|
|
PRJ_TARGET = Windows_NT
|
|
|
|
|
EXEEXT = .exe
|
|
|
|
|
OS = Windows_NT
|
2012-10-14 16:31:15 +02:00
|
|
|
else
|
|
|
|
|
ifeq ($(strip $(findstring darwin, $(TARGET))),darwin)
|
2024-01-24 18:22:24 +01:00
|
|
|
PRJ_TARGET = Darwin
|
|
|
|
|
OS = Darwin
|
2013-10-09 15:38:42 +02:00
|
|
|
else
|
|
|
|
|
ifeq ($(strip $(findstring freebsd, $(TARGET))),freebsd)
|
2024-01-24 18:22:24 +01:00
|
|
|
PRJ_TARGET = freebsd
|
2012-10-14 16:31:15 +02:00
|
|
|
else
|
2024-01-24 18:22:24 +01:00
|
|
|
PRJ_TARGET = UNIX
|
2012-10-14 16:31:15 +02:00
|
|
|
endif
|
2024-01-24 18:22:24 +01:00
|
|
|
OS = UNIX
|
2012-10-14 16:31:15 +02:00
|
|
|
endif
|
|
|
|
|
endif
|
2013-10-09 15:38:42 +02:00
|
|
|
endif
|
2012-10-14 16:31:15 +02:00
|
|
|
|
|
|
|
|
ifeq ($(TARGET), $(shell gcc -dumpmachine))
|
|
|
|
|
IS_CROSS=false
|
|
|
|
|
GCC= gcc
|
|
|
|
|
else
|
|
|
|
|
IS_CROSS=true
|
|
|
|
|
GCC = $(TARGET)-gcc
|
2011-01-07 18:11:12 +00:00
|
|
|
endif
|
2024-01-06 17:57:40 +01:00
|
|
|
|
|
|
|
|
# XML/Ada
|
|
|
|
|
|
|
|
|
|
ifeq (${XMLADA}, true)
|
|
|
|
|
PRJ_XMLADA=Installed
|
|
|
|
|
GEXT_MODULE := gxmlada_setup
|
|
|
|
|
else
|
|
|
|
|
PRJ_XMLADA=Disabled
|
|
|
|
|
GEXT_MODULE := gxmlada_dummy
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifndef TP_XMLADA
|
|
|
|
|
TP_XMLADA=$(PRJ_XMLADA)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Ldap
|
|
|
|
|
|
|
|
|
|
ifeq (${LDAP}, true)
|
|
|
|
|
PRJ_LDAP=Installed
|
|
|
|
|
else
|
|
|
|
|
PRJ_LDAP=Disabled
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# LAL
|
|
|
|
|
|
|
|
|
|
ifeq (${LAL}, true)
|
|
|
|
|
PRJ_LAL=Installed
|
|
|
|
|
GEXT_MODULE := $(GEXT_MODULE) lal_setup
|
|
|
|
|
else
|
|
|
|
|
PRJ_LAL=Disabled
|
|
|
|
|
GEXT_MODULE := $(GEXT_MODULE) lal_dummy
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Sockets
|
|
|
|
|
|
|
|
|
|
PRJ_SOCKLIB=$(NETLIB)
|
|
|
|
|
|
|
|
|
|
# Debug
|
|
|
|
|
|
|
|
|
|
ifeq ($(DEBUG), true)
|
|
|
|
|
PRJ_BUILD=Debug
|
|
|
|
|
else
|
|
|
|
|
PRJ_BUILD=Release
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifeq ($(IS_CROSS), true)
|
|
|
|
|
TPREFIX=$(DESTDIR)$(prefix)/$(TARGET)
|
|
|
|
|
else
|
|
|
|
|
TPREFIX=$(DESTDIR)$(prefix)
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# Install directories
|
|
|
|
|
|
|
|
|
|
I_INC = $(TPREFIX)/include/aws
|
|
|
|
|
|
|
|
|
|
GPROPTS = -XPRJ_BUILD=$(PRJ_BUILD) -XPRJ_SOCKLIB=$(PRJ_SOCKLIB) \
|
|
|
|
|
-XPRJ_LDAP=$(PRJ_LDAP) \
|
|
|
|
|
-XPRJ_XMLADA=$(PRJ_XMLADA) -XPRJ_LAL=$(PRJ_LAL) \
|
|
|
|
|
-XPROCESSORS=$(PROCESSORS) -XSOCKET=$(SOCKET) \
|
|
|
|
|
-XPRJ_TARGET=$(PRJ_TARGET) -XTARGET=$(TARGET) \
|
|
|
|
|
-XTHREAD_SANITIZER=$(THREAD_SANITIZER) \
|
|
|
|
|
-XSSL_DYNAMIC=$(SSL_DYNAMIC) -XTGT_DIR=$(TGT_DIR) \
|
|
|
|
|
$(GPROOTOPTS)
|
2024-01-15 21:34:06 +01:00
|
|
|
export GPROPTS
|
2024-01-06 17:57:40 +01:00
|
|
|
|
|
|
|
|
GPR_STATIC = -XLIBRARY_TYPE=static -XXMLADA_BUILD=static
|
|
|
|
|
GPR_SHARED = -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable
|
2024-01-22 18:15:41 +01:00
|
|
|
|
2024-01-24 18:22:24 +01:00
|
|
|
# Get PATH separator for the host
|
|
|
|
|
ifeq ($(strip $(findstring mingw32, $(HOST))),mingw32)
|
2024-01-22 18:15:41 +01:00
|
|
|
PSEP = ;
|
|
|
|
|
else
|
|
|
|
|
PSEP = :
|
|
|
|
|
endif
|