# Fugu FireWall (http://www.fugufw.com/)
# Copyright (C) 1999  spoon@ix.netcom.com
# Copyright (C) 2000  spoon@ix.netcom.com
# 
# 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
#

# $Id: Makefile,v 1.1.1.1 2004/06/01 17:22:41 dlehman Exp $

VERSION = `cat lcap.spec | grep ^Version: | cut -d\  -f2`

CFLAGS = -O3 -Wall -DVERSION=$(VERSION)
LDFLAGS = -s

FILES = COPYING INSTALL Makefile README lcap.c lcap.spec lcap.8
  
all:		lcap

lcap:		lcap.o

install:	lcap
		install -m700 -D lcap $(prefix)/sbin/lcap
		install -m444 -D lcap.8 $(prefix)/usr/man/man8/lcap.8

rpms:
		$(MAKE) dist
		cp -f lcap.spec /usr/src/redhat/SPECS
		cp -f lcap-$(VERSION).tar.bz2 /usr/src/redhat/SOURCES
		cd /usr/src/redhat && rpm -ba SPECS/lcap.spec

dist:
		$(MAKE) clean
		mkdir lcap-$(VERSION)
		cp $(FILES) lcap-$(VERSION)/
		tar cvpf lcap-$(VERSION).tar lcap-$(VERSION)
		bzip2 lcap-$(VERSION).tar
		$(RM) -r lcap-$(VERSION)

clean:
		$(RM) core *.o lcap lcap-$(VERSION).tar.bz2

