|User's Guide: Plugin Support for Ada 95; Version 0.1.0; Document Revision $Revision: 1.2 $|
|Prev||Chapter 2. How to use the plugin packages||Next|
Building consists of building the application and the plugin. The basic principles are described in the user and reference manual of GNAT. For our example the described procedure boils down the the procedure below:
Example 2-5. Building the plugin
$(plugin) : testplugin.o testplugin_interface.o gnatbind -shared -I$(INCDIR) -Lplugin testplugin gnatmake -I$(INCDIR) -c b~testplugin.adb gcc -shared -o $@ b~testplugin.o testplugin.o testplugin_interface.o $(LDFLAGS) ## $(plugin_path) : $(INSTALL) -d $@
Important to note is that the gnatbind prefixes the initializer/finalizer of the compilation unit with the name plugin. This is important since the class loader is based on this naming convention in order to resolve the names and the call them after loading.
The purpose of the plugin_path target is to provide the load path before the plugin can be stored at this place.
Building the application is mutch simpler and follows the normal procedures as shown below: