# 1.0 dxy2ps and hpgl2ps (Copyright) D McCormick
# Commercial reproduction prohibited.
#
# Obtained from UUCP Newsgroup comp.sources.unix
# Spring 1988
#
# Modified by Gordon Jacobs, July 1989
#
# Modified by Michael L. Brown, June, 1990
#
SHELL=		/bin/sh
FILTER1=	dxy2ps
FILTER2=	hpgl2ps
INCLUDE=	defn.h
LOCALLIB=	libroland.a
AR=		ar
ARFLAGS=	ru

#
# If compiling on a SystemV computer, add -DSYSV to the CFLAGS, or if
# your computer doesn't have rint() as part of math.h.  A simple rint()
# is defined in linetype.c
#
# Add -DNOTIMP to list the non-implemented HPGL commands.
#
# Add -DDEBUG for listing the HPGL implemented commands and the PostScript
# output that goes with it.
#
CFLAGS= 	-O -DNOTIMP -DSYSV

# For a Sun computer, activate the following two lines by replacing the
# names sake above.
#
INSDIR=		/usr/local/bin
LOADLIBES=	-lm 

# For a Mips computer, activate the following two lines by replacing the
# names sake above.
#
# INSDIR=        /home/zion1/jac/bin
# LOADLIBES=	-lm
# CFLAGS=       -O0 -signed

# For BSD computers that have ranlib, remove the # before the ranlib below.
# For systems that don't have ranlib, put a # in the first column before ranlib.

OBJ1=	dxy2ps.o

OBJ2=	hpgl2ps.o

OBJC=	arcps.o       changesizes.o circle.o      dxycom.o      end_draw.o\
	getval.o      hpglcom.o     linesize.o    linetype.o\
	manualfeed.o  plotdot.o     plotinit.o    plotps.o\
	userdefchar.o ps_macros.o   rectangle.o   textps.o\
	viewport.o    plotcoords.o  tick.o

all:		$(FILTER1) $(FILTER2) install

$(FILTER1):	$(LOCALLIB) $(OBJ1)
		$(CC) $(CFLAGS) -o $@ $(OBJ1) $(LOCALLIB) $(LOADLIBES)

$(FILTER2):	$(OBJC) $(OBJ2)
		$(CC) $(CFLAGS) -o $@ $(OBJ2) $(OBJC) $(LOADLIBES)

$(LOCALLIB):	$(OBJC)
		$(AR) $(ARFLAGS) $@ $(OBJC)
#		ranlib $(LOCALLIB)

$(OBJC):	$(INCLUDE)

$(OBJ1):	$(INCLUDE)

$(OBJ2):	$(INCLUDE)

install:	install1 install2

install1:	$(FILTER1)
		install -s $(FILTER1) $(INSDIR)

install2:	$(FILTER2)
		install -s $(FILTER2) $(INSDIR)

clean:
		rm -f *.o a.out core libroland.a

