Get XQilla at SourceForge.net. Fast, secure and Free Open Source software downloads

XQilla : UnixBuild

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register
This is an old revision of UnixBuild from 2007-01-25 03:38:29.

Linux / BSD / *nix / Cygwin Build Documentation


Simple Instructions


Developer Instructions

The build system uses autoconf, automake and libtool. It is set to build (mostly) from a single Makefile in the "xqilla" directory. There is a sub-directory Makefile in the "include" directory, but I only did that because I couldn't get the headers to install to the correct path otherwise.

Adding / Removing Files
If you need to add/remove files from the build, it needs to be done in the Makefile.am in the "xqilla" directory, unless the files are inside the "include" directory - when they need to be put in include/Makefile.am. The Makefile has rules to automatically rebuilds itself and it's dependants if they need to be rebuilt.


Configure Options
Specifying "--help" to the configure script will give you a list of options. When developing I usually use "--enable-debug --disable-static --disable-fast-install".

Useful Make Targets

Building from another directory
This can be useful if you want to have two builds at the same time. Often I will have a debug build and a release build. This can also be useful if you want to cross-compile for a number of platforms, or if you just want to keep the "xqilla" directory free from object files. This will only work if you're version of "make" has VPATH support - which I think means GNU make. To do this:

Building on Cygwin
Building XQilla under Cygwin follows the same steps as for other Unixes, however the default behavior is to generate only a static library. To get the shared library (and the Cygwin DLL) you need to make some changes to the generated Makefile. Open the Makefile and find the line that looks like:
libxqilla.la: $(libxqilla_la_OBJECTS) $(libxqilla_la_DEPENDENCIES) 
	    $(CXXLINK) -no-undefined -rpath $(libdir) $(libxqilla_la_LDFLAGS) $(libxqilla_la_OBJECTS) $(libxqilla_la_LIBADD) $(LIBS) -lxerces-c 


Change it to (adding the options: -no-undefined and -lxerces-c to it):
libxqilla.la: $(libxqilla_la_OBJECTS) $(libxqilla_la_DEPENDENCIES) 
	    $(CXXLINK) -no-undefined -rpath $(libdir) $(libxqilla_la_LDFLAGS) $(libxqilla_la_OBJECTS) $(libxqilla_la_LIBADD) $(LIBS) -lxerces-c 


This generates the cygxqilla-0.dll, and libxqilla.dll.a file, which is what is needed to link your code to the dynamic library. If you want to link your code to the dynamic libraries, you need to use libtool under Cygwin. Here is an example of a Makefile line that will link you objects to XQilla and Xerces under Cygwin:
$(TGT): $(OBJS)
	    libtool --tag=CXX --mode=link g++ -v -lstdc++ -lxerces-c -lxqilla  $(OBJS) -o $(TGT) 

To run the application you either have to do a make install on XQilla (to get the cygxqilla-0.dll on the correct directory) or copy the cygxqilla-0.dll to the same directory of the executable.


CategoryDocumentation

There are 3 comments on this page. [Display comments]

Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 0.0823 seconds