#===========================================================================
#
#
#    djscript - A text formatter for the HP DeskJet500 printer.
#  
#    Copyright (C) 1993 Joerg Bullmann
#
#    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, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#===========================================================================

#=================================================
# You can choose your own defaults here:
# Fonts: font_courier, font_lettgoth, font_cgtimes
# Sizes: size_dina4, size_uslegal, size_usletter

#DEFAULTS=-DDEFAULT_FONT=font_courier -DDEFAULT_SIZE=size_uslegal -DDEFAULT_PRT_NAME=\"/dev/lp1\"

CXX=gcc
CXXFLAGS=-O2 $(DEFAULTS)
RM=rm -f

PACKAGE=print.C Makefile README COPYING 

PATH_PREFIX=/usr/local

BINPATH=$(PATH_PREFIX)/bin
MANPATH=$(PATH_PREFIX)/man/man1

%.o : %.C
	$(CXX) $(CXXFLAGS) -c $<

djscript : print.o
	$(CXX) $(CXXFLAGS) -o $@ $^

install : inst_bin inst_man

inst_bin :
	cp djscript $(BINPATH)
	chmod u=rwx,go=rx $(BINPATH)/djscript

inst_man :
	@echo "Currently no manpage available. (sorry)"
#	chmod u=rw,go=r $(MANPATH)/djscript.1

tar :
	tar cvf ../djscript.1.0.tar $(PACKAGE)
	gzip ../djscript.1.0.tar

clean :
	$(RM) *.o djscript






