# Generated automatically from Makefile.in by configure.
CC=gcc
LIBS=-lzephyr -lkrb4 -lkrb5 -ldes425 -lk5crypto -lsocket -lnsl -lcom_err -lncurses -L/mit/gnu/arch/sun4x_57/lib/
#CFLAGS=-I/mit/gnu/include/ -Wall -g -I/usr/athena/include  -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/athena/lib/perl5/5.6.0/sun4-solaris/CORE  -DHAVE_CONFIG_H
CFLAGS=-I/mit/gnu/include/ -Wall -g -I/usr/athena/include  -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/athena/lib/perl5/5.6.0/sun4-solaris/CORE 
LDFLAGS=-L/usr/athena/lib      /usr/athena/lib/perl5/5.6.0/sun4-solaris/auto/DynaLoader/DynaLoader.a -L/usr/athena/lib/perl5/5.6.0/sun4-solaris/CORE -lperl -lsocket -lnsl -ldl -lm -lc -lcrypt -lsec

OBJS=list.o message.o mainwin.o popwin.o zephyr.o messagelist.o commands.o \
     global.o text.o fmtext.o editwin.o util.o logging.o readconfig.o keys.o \
     functions.o zwrite.o viewwin.o help.o filter.o regex.o history.o view.o \
     dict.o variable.o varstubs.o

AUTOGEN=owl_prototypes.h varstubs.c

owl: $(AUTOGEN) $(OBJS) owl.o
	$(CC) -o owl owl.o $(OBJS) $(LDFLAGS) $(LIBS)

tester: $(AUTOGEN) $(OBJS) tester.o
	$(CC) -o tester tester.o $(OBJS) $(LDFLAGS) $(LIBS)

test: tester
	./tester reg

clean:
	$(RM) *~ *.o owl tester core $(AUTOGEN) owl_prototypes.h.new

distclean: clean
	$(RM) config.cache config.log config.status Makefile config.h TAGS

proto: owl_prototypes.h


varstubs.c: variable.c stubgen.pl
	./stubgen.pl > varstubs.c

owl_prototypes.h: codelist.pl varstubs.c $(OBJS:.o=.c)
	./codelist.pl > owl_prototypes.h.new
	@cmp -s owl_prototypes.h.new owl_prototypes.h || echo 'Interfaces changed!'
	@cmp -s owl_prototypes.h.new owl_prototypes.h || mv -f owl_prototypes.h.new owl_prototypes.h

tags:
	etags *.[ch]

*.o:: owl.h config.h owl_prototypes.h
