############################################################################
#** interpcom-1.2  (command interpreter)                                  **
#** general makefile                                                      **
#**                                                                       **
#** Copyright (C) 1999  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                                        **
#**      Aile 45-55                                                       **
#**      2, place Jussieu                                                 **
#**      75251 Paris Cedex 05                                             **
#**      France			 					  **
#**                                                                       **
############################################################################
#export CFLAGS= -O3 -funroll-loops -D_ENG_LANG
export CFLAGS=-g -Wall -D_ENG_LANG
export $(MAKE)
export CC

all :  libinter.a test/test_ test2/test_ mini/libint_m.a appli/funct

OBJS =  command.o complex.o com_sys.o ee.o interp.o mem.o objdef.o 

libinter.a : $(OBJS)
	ar cr libinter.a *.o

test/test_ :
	cd test; $(MAKE)

test2/test_ :
	cd test2; $(MAKE)

mini/libint_m.a :
	cd mini; $(MAKE)

appli/funct : 
	cd appli; $(MAKE)

clean-all :
	rm -f *.o libinter.a convert/convert *% */*% *bck */*bck
	cd test; $(MAKE) clean-all
	cd test2; $(MAKE) clean-all
	cd convert; $(MAKE) clean-all
	cd mini; $(MAKE) clean-all
	cd appli; $(MAKE) clean-all

clean :
	rm -f *.o *bck *%
	cd test; $(MAKE) clean
	cd test2; $(MAKE) clean
	cd convert; $(MAKE) clean
	cd mini; $(MAKE) clean
	cd appli; $(MAKE) clean
	
OBJSD = command_s.o complex_s.o com_sys_s.o ee_s.o interp_s.o mem_s.o objdef_s.o 

libinter.so.1.2 : $(OBJSD)
	$(CC) -shared -Wl,-soname,libinter.so.1 -o libinter.so.1.2 *_s.o

$(OBJSD) : %_s.o : %.c
	$(CC) -c $(CFLAGS) -fPIC $< -o $@
	


