#
# makefile for unravel
#

CXX=$(CC)
CFLAGS += -I../../include -L../../lib/aout
CXXFLAGS=$(CFLAGS)
LIBES=-lbasis

all: unravel ravel

ravel: ravel.o qp.o base64.o clear.o openfile.o
	$(CC) $(CFLAGS) -o ravel ravel.o qp.o base64.o $(LIBES)

unravel: unravel.o qp.o base64.o clear.o openfile.o uudecode.o
	$(CC) $(CFLAGS) -o unravel unravel.o qp.o base64.o clear.o uudecode.o openfile.o $(LIBES)

clean spotless:
	rm -f unravel *.o

install: ravel unravel
	install -o bin -g bin -d $(DESTDIR)/usr/bin
	install -o bin -g bin -m 511 -c -s ravel unravel $(DESTDIR)/usr/bin
	ln -fs unravel $(DESTDIR)/usr/bin/uudecode
	install -o man -g man -d $(DESTDIR)/usr/man/man1
	install -o man -g man -m 444 -c ravel.1 unravel.1 uudecode.1 \
						$(DESTDIR)/usr/man/man1
