#
# Makefile
#
# This file is part of "locatedir"
# by Alexander Kourakos <awk@vt.edu>
#
# Copyright (C) 1994 Alexander Kourakos
# All rights reserved.
#
# This software may be freely copied, modified, and redistributed
# provided that this copyright notice remains unchanged on all copies.
#
# You may not distribute this software, in whole or in part, as part of
# any commercial product without the express consent of the author.
#
# There is no warranty or other guarantee of this software fitness
# for any purpose. It is provided solely "as is".
#

BINDIR	=	/usr/local/bin
MANDIR	=	/usr/local/man/man1

CC	=	gcc -m486
LD	=	gcc

CFLAGS	=	-O2 -s -fomit-frame-pointer
LDFLAGS	=	-N -s

#

OBJS	=	locatedir.o dirlist.o mangle.o util.o

.c.o:		locatedir.h $<
		$(CC) $(CFLAGS) -c $<

all:		locatedir

install:	all
		install -s -m 711 locatedir $(BINDIR)
		install -m 644 locatedir.1 $(MANDIR)

locatedir: 	$(OBJS)
		$(LD) $(LDFLAGS) -o locatedir $(OBJS)

clean:
		rm -f *.o

clobber:	clean
		rm -f locatedir

indent:
		indent -gnu -bad -bap -sob -l75 -fca -d0 -cdb -bli0 -di8 -lp *.[hc]
		rm *~

#
# end of file
#
