[BACK]Return to appb.tex CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / pari-2.2 / doc

Annotation of OpenXM_contrib/pari-2.2/doc/appb.tex, Revision 1.1.1.1

1.1       noro        1: % $Id: appb.tex,v 1.7 2000/11/06 18:59:00 karim Exp $
                      2: % Copyright (c) 2000  The PARI Group
                      3: %
                      4: % This file is part of the PARI/GP documentation
                      5: %
                      6: % Permission is granted to copy, distribute and/or modify this document
                      7: % under the terms of the GNU Free Documentation License
                      8: \appendix{A Sample program and Makefile}
                      9:
                     10: We assume that you have installed the PARI library and include files as
                     11: explained in Appendix A or in the installation guide. If you chose
                     12: differently any of the directory names, change them accordingly in the
                     13: Makefiles.
                     14:
                     15: If the program example that we have given is in the file \kbd{matexp.c} (say
                     16: as the first of several matrix transcendental functions), then a sample
                     17: Makefile might look as follows. Note that the actual file
                     18: {\tt examples/Makefile} is much more elaborate and you should have a look at
                     19: it if you intend to use {\tt install()} on custom made functions, see
                     20: \secref{se:install}.
                     21:
                     22: \bprog
                     23: CC = cc
                     24: INCDIR = @includedir
                     25: LIBDIR = @libdir
                     26: CFLAGS = -O -I$(INCDIR) -L$(LIBDIR)
                     27:
                     28: all:  matexp
                     29:
                     30: matexp:  matexp.c
                     31:       $(CC) $(CFLAGS) -o matexp matexp.c -lpari -lm
                     32: @eprog
                     33:
                     34: \noindent We then give the listing of the program \kbd{examples/matexp.c}
                     35: seen in detail in \secref{se:prog}, with the slight modifications explained
                     36: at the end of that section.
                     37:
                     38: \bprogfile{../examples/matexp.c}
                     39: \vfill\eject

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>