# Graphics package makefile by Dave Brown
# new names and routines Bill Nowicki July 1982
# raster routines. Per Bothner, March 83

.SUFFIXES: .b .s

ScreenOps = screen.b
RasterOps = pattern.b copy.b fill.b get.b put.b roll.b \
	showraster.b bitmaps.b rasterop.b subraster.b
TextOps = text.b gentext.b getfont.b defaultfont.b
Lines = line.b bres.b
Probe = gxprobe.b probe.b decode.b
S = /usr/sun/include

graphics: libgraphics.a vectime

libgraphics.a: $(ScreenOps) $(TextOps) $(RasterOps) $(Lines) $(Probe)
	rm -f libgraphics.a
	ar vrc libgraphics.a \
`lorder68 $(ScreenOps) $(TextOps) $(RasterOps) $(Lines) $(Probe) | tsort'

.c.b:
	cc68 -O -c $<

.c.s:
	cc68 -O -S $<

$(ScreenOps): $S/framebuf.h rasterops.h
$(RasterOps): $S/framebuf.h rasterops.h $S/bitmaps.h
$(Lines): $S/framebuf.h lines.h
text.c: cmr.c
gentext.b getfont.b: $S/text.h $S/sfont.h

clean:
	rm -f *.b *CKP *BAK
	rm -f libgraphics.a testrops

install: libgraphics.a
	cp libgraphics.a /usr/sun/lib

testrops: testrops.b sunio.b buf.b decode.b libgraphics.a
	cc68 -r -o testrops testrops.b sunio.b buf.b decode.b libgraphics.a

vectime: vectime.b line.b bres.b linedjb.b
	cc68 -r -o vectime vectime.b line.b linedjb.b bres.b -lgraphics

bres.b: bres.s
	cc68 -c bres.s
