#$Id: Makefile,v 1.3 2003/08/21 17:48:30 rene0 Exp $

CC=g++ -Wall -g -pipe -Werror

sources:=parsetree.cc token.cc tree.cc
objects:=$(patsubst %.cc,%.o,$(sources))
lints:=$(patsubst %.cc,%.ln,$(sources))
oldsrc:=$(patsubst %.cc,%.cc~,$(sources))
headers:=$(patsubst %.cc,%.h,$(sources))
oldhdr:=$(patsubst %.cc,%.h~,$(sources))

all: bf2c

bf2c: 
	$(CC) -c $(sources)
	$(CC) bf2c.cc -o $@ $(objects)

clean:
	 -$(RM) $(objects) $(lints) $(oldsrc) $(oldhdr) bf2c.cc~ bf2c.ln bf2c Makefile~

check:
	lint -aabcehirsx $(sources) bf2c.cc
