#
# Copyright (C) 1995 Lars Fenneberg
#
# 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.

#
# general
#

CC=gcc
# add -b i486-linuxaout to *both* CFLAGS and LDFLAGS if you have a new
# gcc (>2.6.3-elf) and want a.out binaries
CFLAGS=-O2
LDFLAGS=-s

SED=sed

# ipacct => SBINDIR
# sayip => USR_BINDIR
# ipacctd, ipquota, ipadd => USR_SBINDIR
SBINDIR=/sbin
USR_BINDIR=/usr/bin
USR_SBINDIR=/usr/sbin

MAN_DIR_SYSTEM=/usr/man/man8
MAN_DIR_USER=/usr/man/man1
MAN_DIR_FORMAT=/usr/man/man5

MAN_MODE=0644
MAN_USER=man
MAN_GROUP=bin

# user id of user nobody
NOBODY=-2

#
# ipacctd
#

IPACCTD_PID=/var/run/ipacctd.pid

#
# ipquota
#

QUOTA_STATS=/var/log/quota.stats

#
# don't change anything below this line
#

VERSION=0.7
CFLAGS:=$(CFLAGS) -DVERSION=\"$(VERSION)\"

# there is a conflicting build in rule that says that .h files cant
# be remade. the :: is a workaround because the disabling of certain
# implicit rules via .SUFFIXES doesnt work right... any other way?
%::	%.in
	$(SED) -e 's#@VERSION@#$(VERSION)#g' \
	       -e 's#@QUOTA_STATS@#$(QUOTA_STATS)#g' \
	       -e 's#@IPACCTD_PID@#$(IPACCTD_PID)#g' \
	       -e 's#@NOBODY@#$(NOBODY)#g' $< >$@


.EXPORT_ALL_VARIABLES:
