# slparser
# Copyright (C) 1999  Peter Stuart

# 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; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


all: slparserbuild

# Which compiler
CC=egcs

# Directory with include files
INCLUDE=../include

# Options for development
CFLAGS=-Wall -ansi

# Options for release
# CFLAGS=-Wall -ansi

# Libraries
LIBS=../lib/libptxt.a

slparserbuild: tokenlist.o datastack.o tokenizer.o slparser.o slplib.o

slparsertest: matrix peachey tokenlist.o datastack.o tokenizer.o slparser.o slparsertest.o slplib.o
	$(CC) -o slparsertest $(CFLAGS) -lm \
	../matrix/math3d.o ../matrix/matrix.o tokenlist.o datastack.o \
	tokenizer.o slparser.o slparsertest.o slplib.o $(LIBS)

tokenlist.o: tokenlist.c types.h slplib.h tokens.h ../include/math3d.h \
 ../include/matrix.h tokenlist.h tokenizer.h

datastack.o: datastack.c types.h slplib.h tokens.h ../include/math3d.h \
 ../include/matrix.h datastack.h

tokenizer.o: tokenizer.c types.h slplib.h tokens.h ../include/math3d.h \
 ../include/matrix.h tokenizer.h tokenlist.h

slparser.o: slparser.c types.h ../include/matrix.h ../include/math3d.h \
 ../include/proctext.h slplib.h tokens.h datastack.h tokenlist.h \
 slparser.h

slparsertest.o: slparsertest.c types.h ../include/matrix.h ../include/math3d.h \
 slplib.h tokens.h datastack.h slparser.h \
 tokenlist.h tokenizer.h

slplib.o: slplib.c slplib.h

peachey:
	cd ../peachey ; make install

matrix:
	cd ../matrix ; make

clean:
	-rm -f *.o slparsertest
