#
# Makefile for RTF utilities.
# You may want to change:
#    b, p (the list of programs)
#
# You may need to make the tools/ things (grep, ctags, etc) independently,
# and you may want to install them differently.  Below, "make install"
# will put things in /usr/local; "make really_install" will bash them
# into the real system locations with impunity, and with no warranty of
# merchantability or fitness for any particular purpose, etc.
#
# Michael Hawley
# MIT Media Laboratory
# mike@media-lab.mit.edu
#
b=/usr/local/bin
p = rtfcat rubric rtfcast rtf-ascii
o = rtfopen.o
others = cpp ctags ctree ptags grep egrep make flex
CFLAGS = -g
c = cc $(CFLAGS) -o $@ $@.[cm] $l
m = $c -lNeXT_s

all: $p $o

install: strip
	cp $p $(others) $b
	rm $b/cpp-precomp; ln $b/cpp $b/cpp-precomp
	cp rtfopen.o tools

#
# really_install puts things in real places.
#
really_install: strip
	cp $p $b
	rm /lib/cpp-precomp; cp cpp /lib; ln /lib/cpp /lib/cpp-precomp
	cp ctags ctree ptags /usr/ucb
	cp grep make /bin
	cp egrep flex /usr/bin
	cp rtfopen.o tools

tags: $l; ctags *.h *.m *.c
clean:; rm -rf $p *.o *.a core errors
strip: all; -strip $p $(others)
.c:$l;$c
.m:$l;$m
