# Copyright (C) 1994 Free Software Foundation

# This file is part of the GNU ANSI C++ Library.  This library 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, 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 General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this library; see the file COPYING.  If not, write to the Free
# Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

VERSION = 2.7.0
SHLIB   = libstdc++.so.$(VERSION)

DEPLIBS  = ../libstdc++.a
LDLIBS   = -L.. 
MDEPLIBS = $(DEPLIBS)
MLDLIBS  = $(LDLIBS) ../libstdc++.a -lpml

srcdir=.
CXX=gcc
CXXFLAGS=-I. -I.. -I../stl -I../../libio
#### package, host, target, and site dependent Makefile fragments come in here.
##

#checks: check-tcomplex check-tstring check-tlist check-tmap check-tvector
checks: check-tmap check-tvector

tcomplex.o: ${srcdir}/../std/complext.h ${srcdir}/../std/dcomplex.h
tcomplex: tcomplex.o $(MDEPLIBS)
	$(CXX) -o tcomplex tcomplex.o $(MLDLIBS)

tstring.o: ${srcdir}/../std/bastring.h
tstring: tstring.o $(DEPLIBS)
	$(CXX) -o tstring tstring.o $(DEPLIBS)

tlist: tlist.o $(DEPLIBS)
	$(CXX) -o tlist tlist.o $(DEPLIBS)

tmap: tmap.o $(DEPLIBS)
	$(CXX) -o tmap tmap.o $(DEPLIBS)

tvector: tvector.o $(DEPLIBS)
	$(CXX) -o tvector tvector.o $(DEPLIBS)

# NOTE: Rules for following tests are generated by $(srcdir)/configure.in !!!

.PHONY: check-tstring check-tlist check-tmap check-tvector check-complex

check-tstring: tstring tstring.inp
	./tstring < tstring.inp > tstring.out 2>&1
	diff -c tstring.exp tstring.out

check-tcomplex: tcomplex tcomplex.inp
	./tcomplex < tcomplex.inp > tcomplex.out 2>&1
	diff -c tcomplex.exp tcomplex.out

check-tlist: tlist
	./tlist > tlist.out 2>&1
	diff -c tlist.exp tlist.out

check-tmap: tmap
	./tmap > tmap.out 2>&1
	diff -c tmap.exp tmap.out

check-tvector: tvector
	./tvector > tvector.out 2>&1
	diff -c tvector.exp tvector.out

