# Generated automatically from Makefile.in by configure.
#
#	Copyright (c) 1997 JSC Rinet, Novosibirsk, Russia
#
# Redistribution and use in source forms, with and without modification,
# are permitted provided that this entire comment appears intact.
# Redistribution in binary form may occur without any restrictions.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' WITHOUT ANY WARRANTIES OF ANY KIND.
#

#
# Makefile.in -- template for Makefile
# Process this file with `./configure' to produce Makefile
# 	remember to edit Makefile.in, not Makefile
#

# Top level hierarchy
prefix = /usr/local
exec_prefix = ${prefix}
# Pathname of directory to install the binary
BINDEST = ${exec_prefix}/bin
# Pathname of directory to install the man page
MANDEST = ${prefix}/man

#
# You shouldn't need to edit anything below here.
#

PROG = trafshow
CC = cc
CCOPT = -fno-common
INCLS = -I. -I/usr/local/include
DEFS = -DHAVE_CONFIG_H

CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
LDFLAGS = 
LIBS = -lpcap -lslang -L/usr/local/lib

# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
# problem if you don't own the file but can write to the directory.
.c.o:
	@rm -f $@
	$(CC) $(CFLAGS) -c $*.c

CSRC = trafshow.c display.c keyb.c color.c interfaces.c addrtoname.c \
	machdep.c util.c getarptab.c
GENSRC = version.c

SRC =	$(CSRC) $(GENSRC)

# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
# hack the extra indirection
OBJ =	$(CSRC:.c=.o) $(GENSRC:.c=.o) 

CLEANFILES = $(PROG) $(OBJ) $(GENSRC)

$(PROG): $(OBJ) 
	@rm -f $@
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)

version.o: version.c
version.c: VERSION Makefile
	@rm -f $@
	@sed -e 's/.*/char version[] = "&";/' VERSION > $@
	@echo 'char compiled[] = "$(CC) $(CFLAGS) $(LIBS)";' >> $@
	@echo 'char target[] = "i386-unknown-gnu";' >> $@
	@echo 'char libpcap[] = "0.8.3";' >> $@

install: force
	./install-sh -c -s -m 550 -o bin -g 0 $(PROG) $(DESTDIR)$(BINDEST)/$(PROG)
	./install-sh -c -m 444 -o bin -g bin $(PROG).1 $(DESTDIR)$(MANDEST)/man1/$(PROG).1
	./install-sh -c -o root -m 644 .trafshow /etc/$(PROG)

clean:
	rm -f $(CLEANFILES)

distclean:
	rm -f $(CLEANFILES) Makefile config.h \
		config.cache config.log	config.status

tar:	force
	@cwd=`pwd`; dir=`basename $$cwd`; name=$(PROG)-`cat VERSION`; \
	list=""; tar="tar cvf"; \
	for i in `cat FILES`; do list="$$list $$name/$$i"; done; \
	rm -f ../$$name; ln -s $$dir ../$$name; \
	(cd ..; $$tar - $$list) | gzip -c > /tmp/$$name.tgz; \
	rm -f ../$$name

force:	/tmp
depend:	$(GENSRC) force
	mkdep $(CFLAGS) $(SRC)


syntax highlighted by Code2HTML, v. 0.9.1