# Cprint 1.0 Makefile
#
# Copyright (C) 1992  Tim Nali
#
#    Cprint is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              


# LIBDIR - where the macro files will go
# BINDIR - where the binary will go
# DOCDIR - where the manual will go
# MANDIR - where the man page will go.

LIBDIR=/usr/TeX/lib/tex/macros
BINDIR=/usr/TeX/bin
DOCDIR=/usr/TeX/lib/tex/inputs
MANDIR=/usr/TeX/man

AR	=ar
CPP	=gcc
CFLAGS	= -O2

.c.o:
	$(CPP) $(CFLAGS) -c -o $*.o $<

all:	cprint install

cprint: cprint.o texconvert.o 
	$(CPP) $(CFLAGS) -o cprint cprint.o texconvert.o 

cprint.o: cprint.c
texconvert.o : texconvert.c

install: 
	strip cprint
	cp cprint $(BINDIR)
	cp cprint.1 $(MANDIR)
	cp lib/* $(LIBDIR)
	cp cprint.manual $(DOCDIR)
	chmod 755 $(BINDIR)/cprint
	chmod 644 $(MANDIR)/cprint.1
	chmod 644 $(LIBDIR)/*
	chmod 644 $(DOCDIR)/cprint.manual

clean:
	rm -f *.o cprint



