
# 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.
#
# IMPORTANT: each time you change the definitions here make sure you run
#            $ make setup

##############################################################################
# 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.
#
prefix	 = $(dir $(shell which gnatls))..

##############################################################################
# TARGET platform, empty for native development
#
# Default value is set to native, the specified value must conform to the
# GCC target name (i.e. powerpc-wrs-vxworks).
#
TARGET = native

##############################################################################
# Specify the default target platform to enable for installed AWS projects.
#
DEFAULT_TARGET = native

##############################################################################
# Set to true if the AWS shared runtime must be built. If ENABLE_SHARED is
# set to false only the static version is built. The default value is true if
# the platform supports shared libraries.
#
# Note that all dependents libraries (like XML/Ada) must have been compiled
# and installed as shared libraries if this option is set.
#
# ENABLE_SHARED = [true|false]
#
ENABLE_SHARED=$(shell $(GNAT) make -c -q -p \
		-Pconfig/setup/test_shared 2>/dev/null && echo "true")

##############################################################################
# Specify the default library type to setup for the installed AWS project.
#
# DEFAULT_LIBRARY_TYPE = [static|relocatable]
#
DEFAULT_LIBRARY_TYPE = static

##############################################################################
# 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	= $(shell $(GNAT) make -c -q -p \
		-Pconfig/setup/test_xmlada 2>/dev/null && echo "true")

##############################################################################
# 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	= $(shell $(GNAT) make -c -q -p \
		-Pconfig/setup/test_asis 2>/dev/null && echo "true")

##############################################################################
# Zlib mandatory, check if zlib is already installed and recent enought,
# otherwise compile the one coming with AWS.
#
# ZLIB = [true|false]
#
ZLIB	= $(shell $(GNAT) make -q -p -Pconfig/setup/test_zlib 2>/dev/null \
	  	  && .build/native/setup/zobj/mzlib \
		  && echo "true")

##############################################################################
# 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). To build AWS's with SSL support
# you need to set SOCKET to openssl, in this case you must have installed
# OpenSSL on your computer. OpenSSL libraries are distributed on Windows
# platforms.
#
# 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

##############################################################################
# Number of parallel compilations to do.
#
PROCESSORS	= 2

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

ifeq ($(TARGET), native)
GCC	  = gcc
else
GCC	  = $(TARGET)-gcc
endif

UNAME = $(shell uname)

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