############################################################################
#** funct-3.1                                                             **
#** funct : an application of the interpcom library - makefile            **
#**                                                                       **
#** Copyright (C) 2003  Jean-Marc Drezet                                  **
#**                                                                       **
#**  This library is free software; you can redistribute it and/or        **
#**  modify it under the terms of the GNU Library General Public          **
#**  License as published by the Free Software Foundation; either         **
#**  version 2 of the License, or (at your option) any later version.     **
#**									  **
#**  This library is distributed in the hope that it will be useful,      **
#**  but WITHOUT ANY WARRANTY; without even the implied warranty of       **
#**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    **
#**  Library General Public License for more details. 			  **
#**									  **
#**  You should have received a copy of the GNU Library General Public    **
#**  License along with this library; if not, write to the Free		  **
#**  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   **
#**                                                                       **
#** Please mail any bug reports/fixes/enhancements to me at:              **
#**      drezet@math.jussieu.fr                                           **
#** or                                                                    **
#**      Jean-Marc Drezet                                                 **
#**      Institut de Mathematiques                                        **
#**      UMR 7586 du CNRS                                                 **
#**      173, rue du Chevaleret                                           **
#**      75013 Paris                                                      **
#**      France			 					  **
#**                                                                       **
############################################################################

export CC=gcc
#export CC=icc -O3 -xW -ip -I/usr/local/include
export LINE_ED_LIB=-lreadline -lhistory -ltermcap
export CONVERT=interp-convert
export INCLUDE=
export CEPHES=-lmd
export GRAPH=-lg2 -lgd -ljpeg -lXpm -lfreetype
export GSL=-lgsl -lgslcblas
#export INTERPCOM=-linter
export INTERPCOM=/usr/local/lib/libinter.a

# gcc 2.95.3
#export OPTIM= -O6 -funroll-loops -fomit-frame-pointer -fno-schedule-insns -fschedule-insns2 -malign-double -fstrict-aliasing -mcpu=pentiumpro

# gcc 3
#export OPTIM= -O3 -funroll-loops -fomit-frame-pointer

# generic
#export OPTIM= -O2

# debug
export OPTIM=-g


init :
	@echo options :
	@echo "         " make with-ggi "     "
	@echo "         " make with-allegro " "
	@echo "         " make with-noX " "
	@echo "         " make with-plot " "
	@echo "         " make with-g2 " "
	@echo "         " make clean "         " : deletes the object files
	@echo "         " make clean-all "     " : deletes the object files
	@echo "                                 "and the executables
	@echo

with-ggi :
	cd src ; make -f makefile.ggi
	help_convert bin/data/funct0.dat bin/data/funct.dat 1
	help_convert bin/data/interp0.dat bin/data/interp.dat 1
	cd doc ; make FUNCT=funct_ggi figuresb.ps
	
with-allegro :
	cd src ; make -f makefile.allegro
	help_convert bin/data/funct0.dat bin/data/funct.dat 1
	help_convert bin/data/interp0.dat bin/data/interp.dat 1
	cd doc; make FUNCT=funct_allegro figuresb.ps

with-plot :
	cd src ; make -f makefile.plot
	help_convert bin/data/funct0.dat bin/data/funct.dat 1
	help_convert bin/data/interp0.dat bin/data/interp.dat 1
	cd doc ; make FUNCT=funct_plot figures.ps
	
with-g2 :
	cd src ; make -f makefile.g2
	help_convert bin/data/funct0.dat bin/data/funct.dat 1
	help_convert bin/data/interp0.dat bin/data/interp.dat 1
	cd doc ; make FUNCT=funct_g2 figuresb.ps
	
with-noX :
	cd src ; make -f makefile.nox
	help_convert bin/data/interp0.dat bin/data/interp.dat 1
	help_convert bin/data/funct0.dat bin/data/funct.dat 1
	
clean: 
	rm -f *bck *% *~ bin/*bck bin/*% bin/*~
	cd src; $(MAKE) -f makefile.allegro clean

clean-all:
	rm -f *bck *% *~ bin/*bck bin/*% bin/funct* bin/*~ */*.a bin/com/*.bck bin/res/*.ps bin/res/*.png
	cd src; $(MAKE) -f makefile.allegro clean
	cd doc; $(MAKE) clean-all
	rm -f bin/data/funct.dat bin/data/interp.dat






