#                        Copyright (c) 1988 Bellcore
#                            All Rights Reserved
#       Permission is granted to copy or use this program, EXCEPT that it
#       may not be sold for profit, the copyright notice must be reproduced
#       on copies, and credit should be given to Bellcore where it is due.
#       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.

#	$Header: Makefile,v 4.4 88/07/19 14:34:19 sau Exp $
#	$Source: /tmp/mgrsrc/src/oblit/RCS/Makefile,v $

#	makefile Xenix (8-bit) bitblit code
SHELL = /bin/sh

FLAG= -O -DSYSV
CFLAGS= $(FLAG) -I..

CFILES= Blit.c line.c pixel.c bitmap.c bit_on.c video.c
OBJS= blit.o line.o pixel.o bit_on.o video.o
HFILES= bitmap.h
OTHER=Makefile README
LIB=blitlib.a
START=.

all:		$(LIB)

# bitmap library

$(LIB): $(LIB)(blit.o) \
           $(LIB)(pixel.o) \
           $(LIB)(line.o) \
           $(LIB)(bit_on.o) \
           $(LIB)(bitmap.o) \
	   $(LIB)(video.o)
			ranlib $(LIB)

# Workaround for compiler bug
blit.c:	Blit.c bitmap.h video.h
#	Run CC on Blit.c directly will bomb
	cc -P $(CFLAGS) Blit.c 
	mv Blit.i blit.c

$(LIB)(blit.o): blit.o
			ar rv $(LIB) blit.o

$(LIB)(pixel.o): pixel.o
			ar rv $(LIB) pixel.o

$(LIB)(bit_on.o): bit_on.o
			ar rv $(LIB) bit_on.o

$(LIB)(line.o): line.o
			ar rv $(LIB) line.o

$(LIB)(bitmap.o): bitmap.o
			ar rv $(LIB) bitmap.o

$(LIB)(video.o): video.o
			ar rv $(LIB) video.o
##########################

$(OBJS):	bitmap.h video.h

list:
	@for i in $(CFILES) $(HFILES) $(OTHER); do \
		echo "$(START)/$$i"; \
	done	

clean:
	rm -f *.o $(LIB) blit.c

clobber:
