NCSA
emerge@ncsa.uiuc.edu

Installing a Gazelle Target

In order for Gazelle to be linked with your target implementation, it must be kept in its own directory with the appropriate Makefile. The Gazelle distribution includes a script which constructs this directory and Makefile for you.

maketarget.pl

The maketarget.pl script will generates a skeleton target in the targets subdirectory. For example, to generate a directory in the targets subdirectory for a database implementation called "my_target", you would run the script like:

# perl maketarget.pl my_target

This creates the targets/my_target subdirectory with a skeletal Makefile.in inside of that directory.

Note: It is assumed that your implementation consists of one file called "target.c" (where target is what you specified on the maketarget.pl command line, in this case "my_target"). If this is not the case, then you can edit the Makefile.in file. See below for more details.

make

If you haven't done so, configure your gazelle system by running:

# ./configure

In order to build gazelle for a specific implementation, you need to specify which implementation you want with the `make' command. For example, to build the "my_target" implementation, type:

# make my_target

This creates a symbolic link in the targets subdirectory called "targets/target" which points to the targets/my_target subdirectory. Afterwards, you can simply type `make' to rebuild the my_target implementation. You can change the implementation type by rerunning make with a different implementation name.

The targets/target subdirectory will contain a library called "libtarget.a" which is then linked into the gazelled. If your implementation needs libraries to run (other than the object file created during compilation), then you should include them in the archival phase of the make process. For example, if my_target needs the library "libmylib.a", then you'll edit the Makefile.in file to look like:

	$(LIBNAME): $(OBJ)
		$(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) /path_to_lib/libmylib.a
	
where path_to_lib is the path to where libmylib.a resides. Afterwards, you'll have to rerun the configure script to generate a Makefile.