# Makefile for the line by line stats program

#Modified by Casey Smith on 9/9/03 to make compatible with Cygwin
#Modification checks are broken here, so everything will always recompile
#regardless of need

BIN 	=  ../../../../bin
CC	= gcc
ID3	=  ../../Include/SYM.h
PB	=  ${BIN}
OBJS	=  main.o
PROGS	=  main.c 
FILES	=  Makefile $(PROGS) 
LIBES	=  -L../../Eglib -L../../Statlib -L../../Lib \
		-leg -lstat -lutil -lm
LOBJS	= ../../Eglib/libeg.a ../../Statlib/libstat.a ../../Lib/libutil.a
LLNS	= ../../Eglib/llib-leg.ln ../../Statlib/llib-lstat.ln \
		../../Lib/llib-lutil.ln
CFLAGOPTS = 
CFLAGS	= -w -I../../Include $(CFLAGOPTS)
INCLUDES = BITARRAY.h DEFN.h SYM.h TREE.h mod.h BITSET.h Lib.h TABLE.h \
           class.h sets.h
#-I../../Include -O -s

install:	$(PB)/lstat

$(PB)/lstat:	lstat
	cp bin/* $(PB)
	#strip  $(PB)/lstat

lstat:		$(OBJS) $(LOBJS)
	$(CC) $(CFLAGS) $(OBJS) $(LIBES) -o bin/lstat

$(OBJS):	$(ID3)
	$(CC) $(CFLAGS) $(PROGS) -c

lint:
	lint -I../../Include $(LLNS) lstat.c main.c

clean:
	rm -f *.O *.o lstat errs bin/*   $(INCLUDES)
