So, you want to write a makefile that will peacefully co-exist within the framework of ACE's make structure, eh? Fool!!!!
Seriously, it is not difficult, but there is no documentation on the system in use, either. The following serves as notes mainly to myself so that I don't forget how I did it.
The easiest thing to do is to find a makefile that accomplishes a task similar to what you want to do and copy it, then modify it to suit your needs. Use the table below to help find reasonable prototypes.
| Task | Prototype/Example |
|---|---|
| Build in subdirectories | $(WRAPPER_ROOT)/Makefile |
| Construct a library (.so or .a) | $(WRAPPER_ROOT)/ace/Makefile |
| Construct a binary | $(WRAPPER_ROOT)/examples/Logger/client/Makefile |
| ORBIX-related | $(WRAPPER_ROOT)/examples/CORBA/Makefile |
Those form the make framework. They are
required. Just put them in and leave them alone for now. To
gain a deeper understanding of what's happening, you can dig
into them. They are:
| Target | Requirements |
|---|---|
| Variable | Meaning | Example |
|---|---|---|
| FILES | A whitespace-separated list of file basenames which will be combined to form the ultimate target, e.g., the library or the binary. |
To compose a library from foo.o,
bar.o, and blat.o, use:
FILES = foo bar blat |
| LIB | The name of an archive-style library target. | libACE.a |
| SHLIB | The name of an shared library target. | libACE.so |
| MAKEFILE | The name of the file from which |
To instruct MAKEFILE = Instructions |
| ACELIB |
Used to specify the ACE library when building executables.
The default is -lACE. This can be overridden
in either individual makefiles or in the
platform_macros.GNU file.
|
To force a static build (i.e., to use libACE.a)
specify: ACELIB = -Bstatic -lACE -Bdynamic.
|