CSV Library (Libcsv)
Scott C. Karlin   (scott@cs.princeton.edu)

Libcsv is a simple C library for manipulating CSV (Comma Separated
Value) files.




Building, Installing, and Using the Library
-------------------------------------------

My libraries, and the applications I write that use the libraries, expect
that my libraries live in a common directory and that LIBSROOT points
there.  Here's what I do to setup and untar the library:

$ export LIBSROOT="$HOME/Software/Libs"
$ cd $LIBSROOT
$ tar zxvf Libcsv-*.tgz

To build and "install" the library:

$ cd Libcsv
$ make install

Note that "make install" will not touch anything outside the Libcsv
directory tree.

At this point, the header files for the exported functions will be in
$LIBSROOT/Libcsv/include and the library will be
$LIBSROOT/Libcsv/lib/i386/libcsv.a.  Note that the headers
in $LIBSROOT/Libcsv/include are copied there by "make install"
in the src directory.  (This happens automatically when you run
"make install" at the top level.)  If you want to make changes in the
headers, you must make them in the src directory.  (The copies in include
are ignored by CVS and overwritten by "make install".)




A Few Words about the Directory Structure and Makefile Design
-------------------------------------------------------------

You may notice that the directory layout is a little involved.  This is to
support multiple architectures (i386, PowerPC, StrongARM).  The default is
to only compile for i386 under Linux.

* Makefiles support the following targets:
   all  (default)  -- compile everything, but don't install.
   install         -- compile everything, and install.  (Install means
                      to copy the .a files to the lib subdirectories
                      and the .h files to the include subdirectories.)
   clean           -- remove object files in src subdirectories.
   veryclean       -- clean + remove library files in src subdirectories .
   distclean       -- veryclean + remove library files in lib subdirectories
                      and remove header files in include subdirectories.
  In general, my Makefiles are recursive.  Note that sometimes "all"
  will actually perform an "install" when make is run from the top level
  directories.

* Note that "install" will not touch anything outside the Libcsv directory
  tree.


