
# This makefile includes all variables used to configure AWS. You can update
# variables here and should not have do change the main makefile.
#
# IMPORTANT: each time you change the definitions here make sure you run
#            $ make setup

##############################################################################
# AWS will be installed under $(INSTALL). Update this variable to point to
# the install directory. You probably want to set this to the GNAT root
# directory to have AWS project files automatically available.
#
INSTALL	 = $(dir $(shell which gnatls))..

##############################################################################
# Set to true if AWS must be built as a shared library. If SHARED is set to
# false AWS is built as a static library. It is possible to build and
# install both versions of the AWS runtime (static and shared) by building
# with SHARED set to true and then to set to false. The last built version
# will be used as the default when building applications.
#
# SHARED = [true/false]
#
SHARED	= true

##############################################################################
# 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
# to point to the XML/Ada project files if not installed in the standard
# location.
#
# XMLADA = [true/false]
#
XMLADA	= false

##############################################################################
# ASIS optional, needed if you want to build ada2wsdl tool. This tool can be
# used to create a WSDL document from an Ada spec. Set ASIS to true to
# activate ASIS support. You must also set ADA_PROJECT_PATH to point to the
# ASIS project files if not installed in the standard location.
#
# If you activate ASIS you also need to activate XMLADA above.
#
# ASIS = [true/false]
#
ASIS	= false

##############################################################################
# IPv6, optional. If you want to use IPv6 sockets just uncomment the IPv6
# variable below.
#
# IPv6 = [true/false]
#
IPv6	= false

##############################################################################
# AWS supports SSL (Secure Socket Layer). The SSL support is always built-in
# AWS. To build AWS's demos will SSL support you need to set SOCKET to ssl, in
# this case you must have installed OpenSSL on you computer. OpenSSL libraries
# are distributed on Windows platforms therefore the SSL mode is the default
# on this platform. (note that below ssl and openssl are aliases).
#
# SOCKET = [std/openssl/gnutls]
#
SOCKET	= std

##############################################################################
# AWS provides a binding to the LDAP API. This binding will use the standard
# 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
# set LDAP=true below.
#
# LDAP = [true/false]
#
LDAP	= false

##############################################################################
# To activate the debug mode just uncomment the variable below. This will
# build AWS with debug information and will output more build information.
#
# DEBUG = [true/false]
#
DEBUG	= false

##############################################################################
# To run regression tests with GDB, uncomment the line below.
#
#GDB_REGTESTS = 1

##############################################################################
# Tools used by AWS
#
AR 		  = ar
AWK               = awk
CHMOD	 	  = chmod
CP	 	  = cp -p
DLLTOOL	 	  = dlltool
GCC               = gcc
GCC_FOR_HOST      = gcc
GNAT		  = gnat
GNAT_FOR_HOST	  = gnat
GREP		  = grep
GZIP	 	  = gzip
MKDIR	 	  = mkdir -p
MV	 	  = mv
RM	 	  = rm
SED	 	  = sed
TAR	 	  = tar
WINDRES	 	  = windres
CAT		  = cat
STRIP		  = strip

UNAME = $(shell uname)

ifeq ($(UNAME), SunOS)
DIFF	=	diff -w
else
DIFF	=	diff -w -c
endif

##############################################################################
# Consistency checks

ifneq ($(DEBUG), true)
ifneq ($(DEBUG), false)
$(error DEBUG variable must be set to true or false)
endif
endif

ifneq ($(IPv6), true)
ifneq ($(IPv6), false)
$(error IPv6 variable must be set to true or false)
endif
endif

ifneq ($(SHARED), true)
ifneq ($(SHARED), false)
$(error SHARED variable must be set to true or false)
endif
endif

ifneq ($(ASIS), true)
ifneq ($(ASIS), false)
$(error ASIS variable must be set to true or false)
endif
endif

ifneq ($(XMLADA), true)
ifneq ($(XMLADA), false)
$(error XMLADA variable must be set to true or false)
endif
endif

ifneq ($(LDAP), true)
ifneq ($(LDAP), false)
$(error LDAP variable must be set to true or false)
endif
endif

ifeq ($(ASIS), true)
ifeq ($(XMLADA), false)
$(error ASIS is set and requires XMLADA to be installed. \
	You may be missing XMLADA=true)
endif
endif

ifneq ($(SOCKET), std)
ifneq ($(SOCKET), openssl)
ifneq ($(SOCKET), gnutls)
$(error SOCKET variable must be set to std, openssl or gnutls)
endif
endif
endif

ifeq ("$(INSTALL)", "..")
$(error "Wrong install path : INSTALL='$(INSTALL)', \
  Check that GNAT is in the PATH")
else
ifeq ("$(INSTALL)", "")
$(error "Wrong install path : empty INSTALL variable")
endif
endif
