This section describes a feature which is usually not needed, so you may skip it at a first reading. As a prerequisite, you probably need to have read the section 4.1.2 to make any use of this section.
It is possible that you may need/want to insert special code in the GNUmakefile.preamble and GNUmakefile.postamble for the wrappers. For example, some special flags required to compile an Objective-C library (the Objective-C wrapper library for your library) against your Objective-C library.
JIGS itself by default does not generate GNUmakefile.preamble and GNUmakefile.postamble at all; but it will look in the library directory for the files
GNUmakefile.wrapper.objc.preamble GNUmakefile.wrapper.objc.postamble GNUmakefile.wrapper.java.preamble GNUmakefile.wrapper.java.postambleand, if any of them is present, copy them into the JavaWrapper directory, in the following way:
GNUmakefile.wrapper.objc.preamble --> JavaWrapper/Objc/GNUmakefile.preamble GNUmakefile.wrapper.objc.postamble --> JavaWrapper/Objc/GNUmakefile.postamble GNUmakefile.wrapper.java.preamble --> JavaWrapper/Java/GNUmakefile.preamble GNUmakefile.wrapper.java.postamble --> JavaWrapper/Java/GNUmakefile.postamble
In this way, by adding one of these files to your library's directory, you can have it copied into the generated wrappers in the appropriate place.
You would do so by creating a file called
GNUmakefile.wrapper.objc.postambleand adding to this file something like the following line
ADDITIONAL_LIB_DIRS = -L/opt/nicola/MyLibrary/Please note that you will need to install your library anyway before you can use the java wrappers, because the library must be found at run-time as well!
A classical case in which you need this trick is if you are building the java wrappers with the library itself (that is, if you have a GNUmakefile which includes both library.make and java-wrapper.make and which you use to compile both. In that case, you need to add
ADDITIONAL_LIB_DIRS = -L../../$(GNUSTEP_OBJ_DIR)to your GNUmakefile.wrapper.objc.preamble to make sure that, when the java wrappers are built, the compiler will find the original library (and you also need to make sure that library.make is included before java-wrapper.make so that the library is compiled before the wrappers.