Compilation under unix and MacOs 10.2  with g++ 
------------------------------------------------

for compilation  under window or MacOs 
with codewarrior compiler  see the README_CW.


The makefile is now parameter with the shell variable HOSTTYPE.
All the compile variable is now defined in  file
src/Makefile-$HOSTTYPE

if you need the eigen value computation
install the arpack and arpack++ library see README_ARPACK

To defined $HOSTTYPE to linux  under sh shell
> export HOSTTYPE=linux 
or add HOSTTYPE=linux at the end of the make command, like
> make all  HOSTTYPE=linux
the list of HOSTTYPE is: i386 linux macintosh


The variable defined in this file are :
OOPTFLAGS= -O  # compilation with optimization
GOPTFLAGS= -g  # compilation with debugging 
# FLAGS for optimisated version 
OFFFLAGS= -DDRAWING -DLONG_LONG  -DNCHECKPTR 
#  flags for debug version  
GFFFLAGS= -DDRAWING -DLONG_LONG -DCHECK_KN #-DWITHCHECK
BIN_DIR=$(HOME)/bin-$(HOSTTYPE)   #install dir
COMPILE_DIR=c-$(HOSTTYPE)        #compile dir.

Freefem++ with eigen value
EIGEN= eigenvalue.o  # to compile the target eigenvalue.o 
LIBARPACK=  (the arparck fortran  library)
LIBF77=   (the fortan library)
INCARPACKPP = -DEIGENVALUE -I(arpack++ include directory)

Freefem++ without eigen value 
EIGEN=# eigenvalue.o  # to compile the target eigenvalue.o
LIBARPACK= #
LIBF77=
INCARPACKPP=



So to compile create the file  src/Makefile-$HOSTTYPE
to add /or change the compiler, change the 
location of X11R6 include and library.



to compile optimized version (compilation take more than 30m)
> make all 
this create file 
 $(COMPILE_DIR)/FreeFem++
 $(COMPILE_DIR)/FreeFem++-nw


or (for the debug version)
> make all-g 
this create file 
 $(COMPILE_DIR)-g/FreeFem++
 $(COMPILE_DIR)-g/FreeFem++-nw

>make mpi 
to make parallele version.

>make gl
to make the MacOS OpenGL version for FreeFem++ CoCoa application

> make install 
to install all the  current version in directory  $(BIN_DIR) 
remark: the directory must exist before install.

The install file can be:

 FreeFem++          #  optimized X11 version
 FreeFem++-g        #  debug X11 version
 FreeFem++-nw       #  optimized postscript  version 
 FreeFem++-nw-g     #  debug     postscript  version 
 FreeFem++-mpi      #  optimized mpi version 
 FreeFem++-mpi-g    #  debug mpi version 
 /Applications/FreeFem++.app  # Drag and Drop CoCoa MacOs Application 
 FreeFem++-CoCoa    #  MacOS Shell script  for MacOS OpenGL version 
                    # (use  /Applications/FreeFem++.app)


--tested  under linux or MacOs/Darwin with the compilers 
g++  version 2.95.2, 2.95.3, 3.01 3.1

it take 15 mn to compile all all-g  on my PowerBook G4 666Mhz 256MB,
and it take more than 1hour under linux.

Under window or MacOs the soft was precompile

All the Examples are in the  two directories
examples++ and examples++-tutorial the suffixe is .edp 
 (equations aux derivees partielles in french)

to test all the exemple under unix: 

cd examples++; ../c-$HOSTTYPE/FreeFem++  all.edp
cd examples++-tutorial; ../c-$HOSTTYPE/FreeFem++   all.edp


Under MacOS 10.2 under terminal application:
1) edit src/Makefile-macintosh to set your
BIN_DIR=$(HOME)/bin/$(MACHTYPE)-$(VENDOR)-$(OSTYPE)
for example to (if you have root access)
BIN_DIR=/usr/local/bin 
remark the BIN_DIR must be in your PATH shell variable
2) compile with:
make all all-g gl-g gl
3) install:
make install
4) to run 
FreeFem-CoCoa examples++/all.edp


Warning on MacOSX, some link problem occures because the  RTTI and template
with the apple version c++ (version 2.95.2)  and
this working now  with new g++3 compiler (default compiler in MacOs 10.2)




