#
# Copyright (C) 1995,1996 Lars Fenneberg, Joao Ventura
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

include ../MCONFIG

all:	ipstats ipallow man

ipstats: ipstats.o database.o hash.o log.o version.o
ipstats.c: pathnames.h

ipallow:  ipallow.o database.o hash.o log.o version.o
ipallow.c: pathnames.h

man:	ipstats.8 ipallow.8

install: ipstats ipallow
	install -m 0750 -o bin -g bin ipstats $(USR_SBINDIR)
	install -m 0750 -o bin -g bin ipallow $(USR_SBINDIR)
	touch $(IP_STATS)
	chown root.root $(IP_STATS)
	chmod 644 $(IP_STATS)

install.man: ipstats.8 ipallow.8
	install -m $(MAN_MODE) -o $(MAN_USER) -g $(MAN_GROUP) ipstats.8 $(MAN_DIR_SYSTEM)
	install -m $(MAN_MODE) -o $(MAN_USER) -g $(MAN_GROUP) ipallow.8 $(MAN_DIR_SYSTEM)

clean:
	rm -f *.o *~ core

clobber: clean
	rm -f ipallow ipstats *.8 *.1 pathnames.h
