*  BasicMathEval INSTALL file
*  Copyright (C)  2015, 2016  Ivano Primi  <ivprimi@libero.it>    
*
*   Copying and distribution of this file, with or without modification,
*   are permitted in any medium without royalty provided the copyright
*   notice and this notice are preserved.
*
***************************************************************************

INSTRUCTIONS FOR THE INSTALLATION OF THE BasicMathEval LIBRARY ON A
GNU/Linux SYSTEM.

Before installing the BasicMathEval library you should check that the
system where you are going to install it provides the following tools:

1 - The `bash' shell (or another shell sh-compatible);
2 - The `GNU make' utility;
3 - Whatever you need to compile an ANSI-C++ program. The compiler
    should accept at least the options -c (for compile only), 
    -I (to specify the path where to search for non-standard include files) 
    and -D (to define macros).
    I built up the library and tested it by using the GNU C++ Compiler (g++, 
    version 4.7.2) on Debian GNU/Linux 7.
    If you are interested in g++ you may get it at the address

		gcc.gnu.org		.


TO START BUILDING THE LIBRARY BasicMathEval (WHOSE FINAL NAME WILL
BE `libbmEval.a'), YOU SHOULD OPEN A SHELL AND ENTER IN THE DIRECTORY
CONTAINING THE SOURCE OF THE LIBRARY (AND THIS FILE TOO). THEN, AFTER
EVENTUALLY EDITING THE SUPPLIED MAKEFILE TO CHANGE SOME PREDEFINED
SETTINGS, YOU SHOULD SIMPLY LAUNCH THE COMMAND:

	make install

THIS WILL BUILD AND INSTALL THE LIBRARY INTO '/usr/local/lib', THE NECESSARY
HEADER FILES INTO '/usr/local/include/BasicMathEval', THE DOCUMENTATION INTO
'/usr/local/doc/BasicMathEval', AND THE TOOL bmEvalConf INTO '/usr/local/bin'.

IF YOU WANT TO BUILD AND INSTALL ALSO THE SIMPLE SCIENTIFIC CALCULATOR
DISTRIBUTUED WITH BasicMathEval YOU SHOULD REPLACE make install WITH:

	make installssc

IN ADDITION TO THE LIBRARY FILES, THIS COMMAND WILL INSTALL THE
PROGRAM ssc INTO '/usr/local/bin'.

You may change the root directory of the installation by modifying
the value of the variable PREFIX in the Makefile:
'make install' will put the archive file of the library in "$PREFIX/lib",
the header files in "$PREFIX/include/BasicMathEval", the documentation
in "$PREFIX/doc/BasicMathEval" and the program bmEvalConf in "$PREFIX/bin";
analogously, 'make installssc' will install ssc (abbreviation
of simple scientific calculator) in "$PREFIX/bin".

If one or more of these subdirectories does not exist the installation 
procedure will try to create them.

You may also change the values of the variables LIBDIR, INCLUDEDIR, BINDIR 
or/and DOCDIR to control in a better way where the installation procedure will
put the files to be installed. 
All these modifications to the Makefile should be done before
launching the command 'make install' or 'make installssc'.
Mind that, if you want to install the library inside a system-directory,
you will have to launch the 'make install' (or 'make installssc')
command as root.

If you are a programmer and you want to contribute to the debug of the
BasicMathEval library then you would probably like to know how to produce
debugging informations for the code you are about to compile.
You can do this by defining the variable DEBUG_MACRO (see Makefile)
as '-g'. You can also set this variable to -g2, -g3, or -ggdb if you are using 
the g++ compiler.
I assume that your compiler uses -g as debugging option: if your
compiler makes use of another option to activate the production of
debugging symbols, then you should use that one instead of -g. 

If you wish to produce optimized code and g++ is your compiler, 
then you should define the variable OPT_MACRO as '-O', '-O2' or '-O3'.
	
Mind that g++ allows enabling debug and optimization at the same time,
if you want it.

After the installation, you can use the commands:

'make clean'		to remove the files ssc, bmEvalConf, the object-files 
      			and the archive file of BasicMathEval (libbmEval.a) 
			from the source directory of the library,

'make uninstall' 	to remove from the system what has been previously 
      			installed.

'make uninstall' will also remove the subdirectory 'BasicMathEval' 
from '$PREFIX/doc' and from '$PREFIX/include'.

Since I only work on GNU/Linux, I do not supply the Makefile for 
Microsoft Windows(R) nor for MacOS X(R).

For information on how to use BasicMathEval functions in your code and 
on how to build your BasicMathEval-based programs, read the MANUAL.
The MANUAL is contained in the same directory where you have found 
this file.
