Daylight Summer School 1998, July 28-30, St. John's College, Santa Fe, NM

Daylight Worksheet - Compiling the contrib code

There is much useful code in the Daylight contrib directory, some useful as-is, and some useful as building blocks. This code also serves as examples of function usage and syntax.

  1. Let's compile one of the contrib directories. First we have to copy the files to our own directory.

    mkdir $HOME/toolkit/thor
    cd $DY_ROOT/contrib/src/c/thor
    cp * $HOME/toolkit/thor
    cd $HOME/toolkit/thor

  2. Examine the makefile. Note the following:

  3. Copy the new program thorsearch.c into this directory. Modify the makefile to incorporate this program. This involves adding the program name to the all: line via the PROGS macro and adding dependency and rule lines, such as:

    TLOBJS = thorload.o
    thorload: $(TLOBJS)
    (tab here) $(CC) -o $@ $(CFLAGS) $(TLOBJS) $(LIBS) $(SYSLIBS)

  4. Now try to make thorsearch and test the program.

Daylight Chemical Information Systems Inc.