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

File: [local] / OpenXM_contrib / pari-2.2 / doc / Attic / appb.tex (download)

Revision 1.1.1.1 (vendor branch), Tue Oct 2 11:16:56 2001 UTC (22 years, 7 months ago) by noro
Branch: NORO
CVS Tags: RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, PARI_2_2
Changes since 1.1: +0 -0 lines

Imported pari-2.2.1(alpha).

% $Id: appb.tex,v 1.7 2000/11/06 18:59:00 karim Exp $
% Copyright (c) 2000  The PARI Group
%
% This file is part of the PARI/GP documentation
%
% Permission is granted to copy, distribute and/or modify this document
% under the terms of the GNU Free Documentation License
\appendix{A Sample program and Makefile}

We assume that you have installed the PARI library and include files as
explained in Appendix A or in the installation guide. If you chose
differently any of the directory names, change them accordingly in the
Makefiles.

If the program example that we have given is in the file \kbd{matexp.c} (say
as the first of several matrix transcendental functions), then a sample
Makefile might look as follows. Note that the actual file
{\tt examples/Makefile} is much more elaborate and you should have a look at
it if you intend to use {\tt install()} on custom made functions, see
\secref{se:install}.

\bprog
CC = cc
INCDIR = @includedir
LIBDIR = @libdir
CFLAGS = -O -I$(INCDIR) -L$(LIBDIR)

all:  matexp

matexp:  matexp.c
      $(CC) $(CFLAGS) -o matexp matexp.c -lpari -lm
@eprog

\noindent We then give the listing of the program \kbd{examples/matexp.c}
seen in detail in \secref{se:prog}, with the slight modifications explained
at the end of that section.

\bprogfile{../examples/matexp.c}
\vfill\eject