When building Alias API programs, ensure that the include path for the compiler includes the path (in the CFLAGS variable):
-I$(ALIAS_LOCATION)/ODS/Common/include
where $(ALIAS_LOCATION) is usually /usr/aw/alias. The definition of ALIAS_LOCATION at the top of the example Makefile is only necessary if you need to override the value in the environment variable.
On IRIX 6.2, at least version 6.2 of the C++ compiler will be necessary to build OpenModel or OpenAlias plug-ins. Use the 'versions -b -n compiler_eoe' command to see which version of the compiler is installed.
Alias V8.0 is qualified on IRIX 6.2 and not on IRIX 5.3. In most cases, OpenModel applications and OpenAlias plug-ins will work as well as Alias would on IRIX 5.3. If you intend to develop a plug-in or OpenModel application where the final binary should work on both IRIX 5.3 and 6.2 then compile and link the code on IRIX 5.3. On IRIX 6.2, symbols may be introduced during compile or link time that may not exist on IRIX 5.3 thus making the binary incompatible on the 5.3 Operating System.
-L$(ALIAS_LOCATION)/ODS/OpenModel/lib
For the dynamic libraries, ensure that the library path includes this area:
-L$(ALIAS_LOCATION)/lib
In addition, the LFLAGS variable should contain the options:
-lalias_api -lapi_memory -lm -lsun
The Makefiles in OpenModel/examples and OpenAlias/examples demonstrate how all this is done, and it is recommended that you study them before creating new Makefiles.
As well, if developing with the dynamic libraries of Alias OpenModel ensure that LD_LIBRARY_PATH is set to reference the Alias library directory. For example,
setenv LD_LIBRARY_PATH $ALIAS_LOCATION/lib
A plug-in is linked using the `-shared -all' options of CC. For example, if the plug-in is composed of the object files obj1.o obj2.o obj3.o then the plug-in would be linked by the following command:
CC -shared -all obj1.o obj2.o obj3.o -o output_name.plugin
The linking line would become:
CC -shared -all obj1.o obj2.o obj3.o -o output_name.plugin -L $(ALIAS_LOCATION)/lib/
libLiveData.so
-L$(ALIAS_LOCATION)/ODS/OpenModel/lib
In addition, the LFLAGS should contain the options:
-lalias_api -lapi_memory -lapi_image -lm -lodm -lcfg
The Makefiles in OpenModel/examples and OpenAlias/examples provide an example on how to create AIX OpenModel and OpenAlias Makefiles.
makeC++SharedLib -p 10 -I $ALIAS_LOCATION/ODS/OpenAlias/examples/OpenAlias.exp
-n an_entry_point -o output_name.plugin obj1.o obj2.o ...
Shared libraries under AIX 4.1 have one entry point. Plug-ins require two standard entry points ( plugin_init and plugin_exit ) that are called from Alias. The file pluginGlue.o contains the single entry point of the shared library (or plug-in) and is used to return the plugin_init and plugin_exit entry points back to Alias.
Plug-ins under AIX require an exports list. This list is located in $ALIAS_LOCATION/ODS/OpenAlias/examples/OpenAlias.exp and is specified with the Import option to makeC++SharedLib. This file contains the API symbols that are exported from Alias for plug-ins to use and the name of the binary that exports the symbols. The name of the binary is set to .Alias. Plug-ins will fail to load if the Alias binary is renamed to something other than .Alias. A message will be written to the error log in this situation.
The Makefile in $ALIAS_LOCATION/ODS/OpenAlias/examples can be used as the basis for building other AIX 4.1 specific Makefiles.
Type:
make copy
This will copy all the source code for the examples to the current directory. Then type make to compile all the examples. (Note that this assumes that Alias is installed in the default location, if it is not, ALIAS_LOCATION must be set in the Makefile or in the environment as described above.)