However, adding the same Population Callback object file to the project over and over again can get tedious, and typing a custom callback name into the Results Detail Dialog is prone to error. These issues have been addressed. The following section discusses how to add Population Callbacks to Sapphire/Web.
$SAPPHIRE/client/src/SaHtmlC.c
file.
SaHtmlC.c
has source for every Population Callback delivered with the tool. They have been written to work cross-platform, cross-language and as efficiently as possible. Use them as reference, or even copy them and make your adjustments.
$SAPPHIRE/config/PopCalls.list
. When Sapphire/Web is shipped, the PopCalls.list
file contains all of the Population Callbacks delivered with the tool. The Population Callbacks must appear one per line. Blank lines are ignored as well as those that start with a #
.$SAPPHIRE/config/Makefile.tem
file. Then the placeholders in that file are replaced with project-specific information. Some of the placeholders are for Project Options associated with the makefile.
To link your Population Callbacks into every server application, locate the second occurrence of the SA_LIBS
variable, and place your library or object file immediately before $(SA_LIBS)
on the link line. Example:
$(LD) $(LD_FLAGS) $(OBJS) $(APPL_LIBS) $(SA_LIBS) $(SYSTEM_LIBS) $(LIBS) $(XOPEN_LIBS) -o $(EXECUTABLE)After:
$(LD) $(LD_FLAGS) $(OBJS) $(APPL_LIBS) /usr/local/bin/mylib.a $(SA_LIBS) $(SYSTEM_LIBS) $(LIBS) $(XOPEN_LIBS) -o $(EXECUTABLE)