#
#   $Id: Makefile.in,v 1.2 1999/04/27 00:11:43 route Exp $
#
#   Firewalk makefile
#   (c) 1998, 1999 Mike D. Schiffman <mike@infonexus.com>
#
#   @configure_input@

FIREWALK    =   firewalk
FIREWALK_LOC=   /usr/local
FIREWALK_MAN=   $(FIREWALK).1
INSTALL     =   ./install-sh
DEFINES     +=  @DEFS@ `libnet-config --defines`
CFLAGS      =   @CFLAGS@
CPPFLAGS    =   @CPPFLAGS@
LIBS        =   -lnet -lpcap @FW_GTK_CONFIG@ `libnet-config --libs`
OBJECTS     =   main.o firewalk.o watcher.o p_cap.o signal.o \
		packet.o udptcpwalk.o port_list.o util.o @FW_GTK_OBJS@

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFINES) -c $< -o $@

all: firewalk

firewalk: version.h $(OBJECTS)
	$(CC) $(CFLAGS) $(OBJECTS) -o $(FIREWALK) $(LIBS)

version.o: version.h
version.h: ./VERSION
	@rm -f $@
	sed -e 's/.*/static char version[] = "&";/' ./VERSION > $@

install: firewalk
	$(INSTALL) -c -m 0700 $(FIREWALK) $(FIREWALK_LOC)/bin
	$(INSTALL) -c -m 0644 $(FIREWALK_MAN) $(FIREWALK_LOC)/man/man1

clean:
	rm -f *core *.o version.h $(FIREWALK) $(FIREWALK)*.out

distclean: clean
	rm -f config.log config.cache config.status Makefile confdefs.h \
		config.h
# EOF
