# $Copyright: $
# Copyright (c) 1997 by Steve Baker (ice@mama.indstate.edu)
# All Rights reserved
#
# This software is provided as is without any express or implied
# warranties, including, without limitation, the implied warranties
# of merchant-ability and fitness for a particular purpose.

CC = gcc
CFLAGS = -Wall -O -m486 -fomit-frame-pointer
LDFLAGS = -s

DEST=diskhogs
BINDIR=/usr/local/bin
MANDIR=/usr/local/man
MANS=diskhogs.8

QUOTADIR = /usr/src/quota-1.55

all: diskhogs

diskhogs: diskhogs.o
	$(CC) -O -o $(DEST) diskhogs.o ${QUOTADIR}/quotactl.o

diskhogs.o: diskhogs.c

clean:
	if [ -e $(DEST) ]; then rm $(DEST); fi
	if [ -e diskhogs.o ]; then rm *.o fi

install:
	install -d $(BINDIR)
	install -d /var/adm/dh
	if [ -e $(DEST) ]; then \
		install -s $(DEST) $(BINDIR)/$(DEST); \
	fi
	for man in $(MANS); do \
		m=`expr match $$man '.*\(.\)'`; \
		install $$man $(MANDIR)/man$$m/$$man; \
	done
