< 4.5 Library header location Next: 4.6 The wrapper directory Up: 4. Wrapping Objective-C Libraries Previous: 4.4 Library header name

Subsections


4.5 Library header location

When JIGS has determined the name of the header file to parse, it will need to find it. Usually, JIGS will look into the current directory, and then in the standard GNUstep header directories, that is, it will look (in the order) into:
./
$(GNUSTEP_USER_ROOT)/Headers/
$(GNUSTEP_LOCAL_ROOT)/Headers/
$(GNUSTEP_NETWORK_ROOT)/Headers/
$(GNUSTEP_SYSTEM_ROOT)/Headers/
For example, if you are using
include $(GNUSTEP_MAKEFILES)/common.make

JAVA_WRAPPER_NAME = Game
Game_HEADER_FILES = Game/Game.h

include $(GNUSTEP_MAKEFILES)/java-wrapper.make
then JIGS will look for the following files, in the order:
./Game/Game.h
$(GNUSTEP_USER_ROOT)/Headers/Game/Game.h
$(GNUSTEP_LOCAL_ROOT)/Headers/Game/Game.h
$(GNUSTEP_NETWORK_ROOT)/Headers/Game/Game.h
$(GNUSTEP_SYSTEM_ROOT)/Headers/Game/Game.h
and pick up the first it finds.

In some cases, that is not enough - for example, you might not yet have installed your library. In this case, you need to help JIGS by telling it where it might find your header, by setting the XXX_HEADER_FILES_DIR variable (again, replace XXX with your java wrapper name). It might be a relative path (relative to the current directory), such as in

Game_HEADER_FILES_DIR = ../GameLibrary/
or an absolute one, as in
Game_HEADER_FILES_DIR = /opt/games/Source/GameLibrary/

4.5.1 Special header flags

If you need any other special flags for reading the header, use the XXX_ADDITIONAL_CPP_FLAGS variable, as in
Game_ADDITIONAL_CPP_FLAGS = -I/opt/games/Source/Support/Headers
Basically, you should specify all flags which you would normally use to build a library or a bundle or an executable linked against the library you want to wrap.


Next: 4.6 The wrapper directory Up: 4. Wrapping Objective-C Libraries Previous: 4.4 Library header name
Nicola Pero 2001-07-24