#  Makefile for pipeworks
#
#  Copyright 2003 Damien Gregory
#
#    This file is part of pipeworks.
#
#    pipeworks 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.
#
#    pipeworks 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 pipeworks; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

CC= gcc -Wall

all:  pipeworks

filesize.o:  Makefile filesize.h filesize.c
	$(CC) -c -o filesize.o filesize.c

timemanip.o:  Makefile timemanip.h timemanip.c
	$(CC) -c -o timemanip.o timemanip.c

pipeworks.o:  Makefile pipeworks.c filesize.h
	$(CC) -c -o pipeworks.o pipeworks.c

pipeworks:  pipeworks.o filesize.o timemanip.o
	$(CC) -o pipeworks pipeworks.o filesize.o timemanip.o

clean:
	rm -f *.o *~ pipeworks

install: Makefile pipeworks
	cp pipeworks /usr/local/bin
	cp pipeworks.1 /usr/local/man/man1/
	chmod 755 /usr/local/bin/pipeworks
	chmod 644 /usr/local/man/man1/pipeworks.1
	chown root: /usr/local/bin/pipeworks /usr/local/man/man1/pipeworks.1
