#
# Description: Makefile to construct and install nh2ps. Don't forget
# to give your own values to define the variable name of compiler
# (see OPTIONS).
#
# File: bounty:/archive/src/nh2ps/Last/Makefile
# Created: Fri Nov 5 8:15:00 1993 by miguel@bounty.imag.fr (Miguel Santana)
# Version: 4.3
#

# Copyright (c) 1993, 1994, Miguel Santana, M.Santana@frgu.bull.fr
#
# Permission is granted to use, copy, and distribute this software for
# non commercial use, provided that the above copyright notice appear in
# all copies and that both that copyright notice and this permission
# notice appear in supporting documentation.
#
# Permission to modify the software is granted, but not the right to
# distribute the modified code. Please report bugs and changes to
# M.Santana@frgu.bull.fr
# 
# This software is provided "as is" without express or implied warranty.

# A Korean version of a2ps 4.3 using PostScript Font of HLaTeX-0.95
#
# No Copyright, 28 Jan 1997, Choi Jun Ho <junker@jazz.snu.ac.kr>
# 
# Thanks to author of HLaTeX-0.95 for supplying Hangul fonts
# If there is no compile
# option '-DHFONT', it will generate a complete a2ps without hangul support

# stupid a**holes who add non-compatible "features"
SHELL	=/bin/sh

CC	=gcc

D	=.
O	=.

BINDIR	=/usr/local/bin

MANDIR	=/usr/local/man/mann
MANEXT	=n

#CFLAGS	= -DBSD -O -DLPR_PRINT
# SunSolaris 2.x, omit -DLPR_PRINT for no automatical print
CFLAGS	= -DBSD -O2 -DHFONT
# Default values for HEIGHT, WIDTH, MARGIN and DIR_SEP (11.64, 8.27, 1.2, '/').
# Default values for LPR_COMMAND and LPR_OPT ("lpr", "-l")
# No values for TWOSIDED_DFLT, ONESIDED and TWOSIDED
OBJS	      = nh2ps.o

all:		xnh2ps

xnh2ps:		nh2ps.o
		@echo "Linking nh2ps ... "
		$(CC) -o $D/xnh2ps nh2ps.o

nh2ps.o:		nh2ps.c
		@echo "Compiling nh2ps ... "
		$(CC) -c $(CFLAGS) nh2ps.c

install:	xnh2ps
		@echo "Installing nh2ps ..."
		cp xnh2ps $(BINDIR)/nh2ps
		chmod a+rx $(BINDIR)/nh2ps
		@echo "Installing nh2ps_opt ..."
		cp nh2ps_opt $(BINDIR)/nh2ps_opt
		chmod a+rx $(BINDIR)/nh2ps_opt

install.man:	nh2ps.1
		@echo "Installing nh2ps man page ..."
		cp nh2ps.1 $(MANDIR)/nh2ps.$(MANEXT)
		chmod a+r $(MANDIR)/nh2ps.$(MANEXT)

shar:;		shar -b -onh2ps.shar README Makefile nh2ps.c nh2ps.1 nh2ps_opt

tar:;		tar cvf nh2ps.tar README Makefile nh2ps.c nh2ps.1 nh2ps_opt

clean:;		rm -f $(OBJS) xnh2ps core *~ *O
