# Copyright (c) 1988, 1992, The Regents of the University of California.
# Edward Moy, Workstation Software Support Group, Workstation Support Serices,
# Information Systems and Technology.
#
# Permission is granted to any individual or institution to use, copy,
# or redistribute this software so long as it is not sold for profit,
# provided that this notice and the original copyright notices are
# retained.  The University of California makes no representations about the
# suitability of this software for any purpose.  It is provided "as is"
# without express or implied warranty.
#
# SCCSid = "@(#)Makefile	2.3 7/1/92"
#
# For System V, include -DSYSV in CFLAGS below.
# To specify a fixed path for macps.config, include -DCONFIGDIR=\"path\"
# in CFLAGS below (path is the full pathname of the directory).
# To do save/restore context, include -DSAVE in CFLAGS below.
#

prefix=		/mit/sipb
BINDIR=		$(prefix)/bin
MANDIR=		$(prefix)/man/man1
CONFIGDIR= 	$(prefix)/share/macps

CFLAGS = -O -DCONFIGDIR=\"$(CONFIGDIR)\"
MACPS = macps.o macaux.o
PREPFIX = prepfix.o macaux.o

all : macps prepfix

macps : $(MACPS)
	$(CC) -o $@ $(CFLAGS) $(MACPS)

prepfix : $(PREPFIX)
	$(CC) -o $@ $(CFLAGS) $(PREPFIX)

macps.o : macps.c str.h

macaux.o : macaux.c str.h

prepfix.o : prepfix.c str.h

ucbwhich.o : ucbwhich.c ucbwhich.h

clean :
	/bin/rm -f *.o macps prepfix

install :
	install -c -s macps $(BINDIR)
	install -c -m 644 macps.1 $(MANDIR)
	install -c -s prepfix $(BINDIR)
	install -c -m 644 prepfix.1 $(MANDIR)
	mkdir -p $(CONFIGDIR)
	install -c -m 644 macps.config $(CONFIGDIR)
