#****************************************************************************************/
#*                                                                                      */
#*              Joerg Anders, TU Chemnitz, Fakultaet fuer Informatik, GERMANY           */
#*              ja@informatik.tu-chemnitz.de                                            */
#*                                                                                      */
#*--------------------------------------------------------------------------------------*/
#*                                                                                      */
#* This program is free software; you can redistribute it and/or modify it under the    */
#* terms of the GNU General Public License as published by the Free Software            */
#* Foundation; either version 2 of the License, or (at your option) any later version.  */
#*                                                                                      */
#* This program 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 General Public License for more details.             */
#*                                                                                      */
#* You should have received a copy of the GNU General Public License along with this    */
#* program; (See "LICENSE.GPL"). If not, write to the Free Software Foundation, Inc.,   */
#* 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.                            */
#*                                                                                      */
#*--------------------------------------------------------------------------------------*/
#*                                                                                      */
#* If the program runs as Java applet it isn't "interactive" in the sense of the GNU    */
#* General Public License. So paragraph 2c doesn't apply.                               */
#*                                                                                      */
#****************************************************************************************/

# select an appropriate C preprocessor and C compiler
CPP = cpp
# CPP = cc -E
# CPP = gcc -E
# On "Cygnus" select:
# CPP = gcc -E -

CC = gcc
# CC = cc

OBJS =  expand_const.o compute.o
YFLAGS = -d

IDCT.java: IDCT.tmpl expand_const
	-rm -f IDCT.java 
	./expand_const IDCT.tmpl | $(CPP) | sed '1d' >IDCT.java
        
expand_const:   $(OBJS)
	$(CC) -o expand_const $(OBJS) -lm

expand_const.o: expand_const.c y.tab.h
	$(CC) -c expand_const.c

y.tab.h: compute.c

clear: clean
	-rm -f expand *.class

clean:
	-rm -f $(OBJS) core $(OBJS) expand_const IDCT.java y.tab.h y.tab.c compute.c
