#
#   paperease: a driver for the Primax Paperease scanner
#   (c) 2002 James McKenzie <james@fishsoup.dhs.org>. 
#
#   This program 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, 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#   This program was produced by running the windows drivers
#   for the program and recording all accesses to the parallel
#   port circuitry passing the results through awk, sed and uniq.
#
#   Take care not to quit this program except by using 
#   SIGINT - doing do may burn out the motor on your 
#   scanner.
#
#
# Makefile:
#
# Copyright (c) 2002 James McKenzie <james@fishsoup.dhs.org>,
# All rights reserved.
#
# $Id: Makefile,v 1.2 2002/05/19 16:15:46 root Exp root $
#
# $Log: Makefile,v $
# Revision 1.2  2002/05/19 16:15:46  root
# *** empty log message ***
#
# Revision 1.1  2002/05/19 15:57:26  root
# Initial revision
#
#
#
PREFIX=/software
VERSION=1.0

BINDIR=${PREFIX}/bin/
MANDIR=${PREFIX}/man/

SRCS=${wildcard *.c}
HSRCS=project.h
OBJS=${SRCS:%.c=%.o}
CFLAGS=-O
PROG=paperease


${PROG}:${OBJS}
	${CC} ${CFLAGS} ${LFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}

clean:
	/bin/rm -f core a.out *% *~ ${OBJS} ${PROG}

checkin:
	ci -l ${SRCS} ${HSRCS} paperease.man Makefile

tidy: checkin
	indent -i2 -ts0 ${SRCS} ${HSRCS} 

protos: 
	echo "" > prototypes.h
	for i in ${SRCS}; do cproto -v $$i >> prototypes.new; done
	mv prototypes.new prototypes.h

install: ${PROG}
	install -c -m 755 ${PROG} ${BINDIR}
	install -c -m 644 paperease.man ${MANDIR}/man1/paperease.1

${SRCS}: ${HSRCS}

${HSRCS}: prototypes.h

distrib:
	tar cvCfz .. DISTRIB/paperease-${VERSION}.tar.gz paperease/INSTALL paperease/LICENCE paperease/Makefile paperease/calib.c paperease/io.c paperease/main.c paperease/paperease.man paperease/project.h paperease/prototypes.h paperease/util.c paperease/paperease.1 
