Using the Traditional ACE/GNU Configuration
Here's what you need to do to build ACE using GNU Make and ACE's traditional per-platform configuration method:
Install GNU make
3.79.1
or greater on your system (available via anonymous ftp from
prep.ai.mit.edu in the pub/gnu/make/ directory). You must use GNU make or ACE won't compile.
Add an environment variable called ACE_ROOT that contains the name of the root of the directory where you keep the ACE wrapper source tree. The ACE recursive Makefile scheme needs this information. There are several ways to set the ACE_ROOT variable. For instance, in my .login file for TSCH/CSH I have the following entry:
% setenv ACE_ROOT /home/cs/faculty/schmidt/ACE_wrappers
BTW, if you're running BASH or Bourne Shell you'll need to do the following:
% ACE_ROOT=/home/cs/faculty/schmidt/ACE_wrappers; export ACE_ROOT
If you're building a number of versions of ACE, however, (e.g., for different OS platforms or for different releases of ACE) you might use the following approach (again assuming TCSH/CSH):
% setenv ACE_ROOT $cwd
Edit the $ACE_ROOT/ace/OS.h file to update things like default hostname and port numbers you'd like the programs in the $ACE_ROOT/{apps,tests} directories to use by default. Note, however that you can normally skip this step because the defaults are typically fine for most systems.
Create a configuration file, $ACE_ROOT/ace/config.h, that includes the appropriate platform/compiler-specific header configurations from the ACE source directory. For example:
#include "ace/config-sunos5-sunc++-
4.x.h"
The platform/compiler-specific configuration file contains the #defines that are used throughout ACE to indicate which features your system supports. See the $ACE_ROOT/ace/README file for a description of these macro settings. If you desire to add some site-specific or build-specific changes, you can add them to your
config.h file; place them before the inclusion of the platform-specific header file.
There are config files for most versions of UNIX. If there isn't a version of this file that matches your platform/compiler, you'll need to make one. Please send me email if you get it working so I can add it to the master ACE release.
Create a build configuration file, $ACE_ROOT/include/makeinclude/platform_macros.GNU, that contains the appropriate platform/compiler-specific Makefile configurations, e.g.,
include $(ACE_ROOT)/include/makeinclude/platform_sunos5_sunc++.GNU
This file contains the compiler and Makefile directives that are platform/compiler-specific. If you'd like to add make options, you can add them before including the paltform-specific configuration.
Note that because ACE builds shared libraries, you'll need to set LD_LIBRARY_PATH to whereever you put the binary version of the ACE library. For example, you probably want to do something like the following
% setenv LD_LIBRARY_PATH $ACE_ROOT/ace:$ACE_ROOT/lib:$LD_LIBRARY_PATH When all this is done, hopefully all you'll need to do is type:
% make
at the root of the ACE source tree. This will build the ACE library, tests, the examples, and the sample applications. Building the entire ACE release can take a long time and consume lots of disk space, however. Therefore, you might consider cd'ing into the $ACE_ROOT/ace/ directory and running make there to build just the ACE library. As a sanity check, you might also want to build and run the automated "one-button" tests in $ACE_ROOT/tests/. Finally, if you're also planning on building TAO, you should build the gperf perfect hash function generator application in $ACE_ROOT/apps/gperf/.
If you need to regenerate the Svc_Conf_y.cpp file, you'll need to get Berkeley YACC. However, you should rarely, if ever, need to do this.