AWS has been mainly developed with GNAT on Windows. It is built and tested regularly on GNU/Linux and Solaris, it should be fairly portable across platforms. To build AWS you need:
GNU/Ada (GNAT compiler) ;
To build this version you need at least GNAT GPL 2009 Edition or GNAT Pro 6.2 as some Ada 2005 fearures (Ada.Containers, interfaces, overriding keyword) are used. The code should be fairly portable but has never been tested on another compiler than GNAT.
OpenSSL (optional) ;
OpenSSL is an Open Source toolkit implementing the Secure Sockets Layer (SSL v2 and v3) and much more. It is possible to download the OpenSSL source distribution from http://www.openssl.org <http://www.openssl.org> and build it. A Windows binary distribution may also be downloaded there.
OpenLDAP (optional) ;
OpenLDAP is an Open Source toolkit implementing the Lightweight Directory Access Protocol. If you want to use the AWS/LDAP API on UNIX based systems, you need to install properly the OpenLDAP package. On Windows you don’t need to install it as the libldap.a library will be built by AWS and will use the standard Windows LDAP DLL wldap32.dll.
You can download OpenLDAP from http://www.openldap.org <http://www.openldap.org>.
This package is the standard (non-SSL) socket implementation. It exists different implementations of this package:
As above but supporting IPv6 protocol. To select this implementation just do:
$ make IPv6=true setup
Before building be sure to edit makefile.conf, this file contains many settings important for the build. Note that it is important to run make setup each time you edit this file.
When you have built and configured all external libraries you must set the ADA_PROJECT_PATH variable to point to the GNAT Project files for the different packages. For XML/Ada support, you also need to set XMLADA to true in makefile.conf.
At this point you can build AWS with:
$ make setup build
Note that some demos require that AWS be built with SSL support. If you want to activate SSL on UNIX (in this case you must have libssl.a and libcrypto.a available on your platform), open makefile.conf and set the SOCKET variable to openssl. Then rebuild with:
$ make setup build
It is is possible to build AWS in debug mode by setting DEBUG make’s variable in makefile.conf, or just:
$ make DEBUG=true setup build
Note that by default AWS is configured to use the GNAT compiler. So, if you use GNAT you can build AWS just with:
$ make setup build
To build for a cross platform the TARGET makefile variable must be set with the cross toolchain to be used. The value must be the triplet of the toolchain to use.
For example, to build on VxWorks:
$ make TARGET=powerpc-wrs-vxworks setup build
Note that on cross-environment one need to build the demos manually. See demos/README.
AWS comes with some ready to use demos. The demos are a good way to learn how to use AWS.
Here are a short description of them:
For build instructions see demos/README.
When the build is done you must install AWS at a specific location. The target directory is defined with the prefix makefile.conf variable. The default value is set to the compiler root directory. Note that the previously installed version is automatically removed before installing the new one. To install:
$ make install
To install AWS into another directory you can either edit makefile.conf and set prefix to the directory you like to install AWS or just force the make prefix variable:
$ make prefix=/opt install
Alternatively, with GNAT 5.03 and above it is possible to install AWS into the GNAT Standard Library location. In this case AWS is ready-to-use as there is no need to set ADA_PROJECT_PATH, just set prefix to point to GNAT root directory:
$ make prefix=/opt/gnatpro/6.1.1 install
Now you are ready to use AWS !