Daylight Summer School 2002, June 5-7, Santa Fe, NM

Daylight Worksheet - Compiling the contrib code -- WITH HINTS

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 from $DY_ROOT/contrib/src/c/smarts/ to your own directory, created for this purpose.

    % mkdir $HOME/jane_doe/toolkit/smarts
    % cd $HOME/jane_doe/toolkit/smarts
    % cp $DY_ROOT/contrib/src/c/smarts/* .
    % make

    Replace jane_doe with your personal directory.

  2. Examine the makefile. Note the following:

  3. Copy the new program minpath.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 as exist for the other programs.

    minpath: minpath.o
    (tab here) $(CC) -o $@ $(CFLAGS) $@.o $(LIBS) $(SYSLIBS)

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

Daylight Chemical Information Systems Inc.