# *********************************
# * Makefile for Debian Par 1.50  *
# * Par 1.41 Copyright 1993       *
# * by Adam M. Costello           *
# *********************************


CC = gcc -c -O2 
LINK1 = gcc -s
LINK2 = -o
RM = rm -f
JUNK =

BIN=/usr/bin
DOC=/usr/doc/par
MAN=/usr/man/man1

#####
##### Guts (you shouldn't need to touch this part)
#####

OBJS = buffer.o charset.o errmsg.o par.o reformat.o

.c.o:
	$(CC) $<

par: $(OBJS)
	$(LINK1) $(OBJS) $(LINK2) par

buffer.o: buffer.c buffer.h errmsg.h

charset.o: charset.c charset.h errmsg.h buffer.h

errmsg.o: errmsg.c errmsg.h

par.o: par.c charset.h errmsg.h buffer.h reformat.h

reformat.o: reformat.c reformat.h errmsg.h buffer.h

clean:
	$(RM) par $(OBJS) $(JUNK)

install: par par.doc
	install -o root -g root -m 0755 par $(BIN)/par
	install -d $(DOC) -o root -g root -m 0755
	install -o root -g root -m 0644 par.doc $(DOC)
	install -d $(MAN) -o root -g root -m 0755
	install -o root -g root -m 0644 par.1 $(MAN)

