#
# @(#)Makefile.sunw 1.6 88/03/01
#
# Copyright (c) 1988 by Sun Microsystems, Inc.
#

# Global macro definitions 
OSI=SUN
OPT=-O
ROPT=-R
#DEVS=-DINCLCG2 -DINCLCG4 -DINCLBW1 -DINCLGP1
#DEVS=
DEVS=-DINCLCG4
TARGET_ARCH=-mc68010

INCLUDE=../../include
GRAPHICS=../../graphics
LIB=libdev.a

CFLAGS=${OPT} ${ROPT} ${COPTS} -D${OSI} -I${INCLUDE} -I${GRAPHICS} ${TARGET_ARCH}

MFLAGS=${ROPT} ${COPTS} -D${OSI} -I${INCLUDE} -I${GRAPHICS} ${TARGET_ARCH}

SRCS=	SunOSI.c \
	cg2_rop.c \
	cg2_shcrv.c \
	cg2_shrop.c \
	cg2_shtext.c \
	gen_rplrop.c \
	gp1_rop.c \
	gp1_shtext.c \
	gp1_shrop.c \
	mem_rop.c \
	mem_shcrv.c \
	mem_shtext.c \
	mem_vec.c \
	pixrectint.c \
	pr_io.c \
	pr_make.c \
	pr_makefun.c \
	pr_open.c 

OBJS=	SunOSI.o \
	cg2_rop.o \
	cg2_shcrv.o \
	cg2_shrop.o \
	cg2_shtext.o \
	gen_rplrop.o \
	pixrectint.o \
	mem_shtext.o \
	mem_shcrv.o \
	pr_open.o
#	gp1_rop.o \
#	gp1_shtext.o \
#	gp1_shrop.o \
#	mem_vec.o \
#	pr_io.o \
#	pr_make.o \
#	pr_makefun.o

#OBJS=	SunOSI.o \
#	gen_rplrop.o \
#	mem_shcrv.o \
#	mem_shtext.o \
#	mem_vec.o \
#	pixrectint.o \
#	pr_io.o \
#	pr_make.o \
#	pr_makefun.o \
#	pr_open.o

HDRS=	


debug:	all
all:	${INCLUDE} ${LIB}

${LIB}:	${OBJS} mem_rop.o
	ar uv ${LIB} $?
	ranlib ${LIB}

#
mem_rop.o:
	if (test ${TARGET_ARCH} = -sparc); then \
	    cc ${MFLAGS} -c mem_rop.c; \
	else \
	    cc ${MFLAGS} -c mem_rop.c; \
#	    cc ${CFLAGS} -c mem_rop.c; \
#	    cc -v -C -E -o mem_rop.i ${CFLAGS} mem_rop.c; \
#	    gcc ${MFLAGS} -c mem_rop.i; \
	fi;

pixrectint.o:
	cc ${DEVS} ${CFLAGS} ${TARGET_ARCH} -c pixrectint.c

${INCLUDE}: ${INCLUDE}/Makefile
	cd ${INCLUDE}; make -k 

${INCLUDE}/Makefile:
	(cd ${INCLUDE}; ${GET} -GMakefile SCCS/s.Makefile.sun)
	@echo ${INCLUDE}/Makefile retrieved...

${INCLUDE}/pixrect/pixrect.h:
	(cd ${INCLUDE}; make pixrect/pixrect.h)
${INCLUDE}/pixrect/mem_rop_impl_ops.h:
	(cd ${INCLUDE}; make pixrect/mem_rop_impl_ops.h)

depend: ../../../makedepend ${SRCS} ${HDRS}
	../../../makedepend ${INCLUDE} ${GRAPHICS} 

clean:
	rm -f *.a *.o  

FRC:

# START OF AUTOMATICALLY GENERATED DEPENDENCIES 
SunOSI.o: ../../include/pixrect.h SunOSI.c
cg2_rop.o: ../../include/pixrect/pixrect.h cg2_rop.c
cg2_shcrv.o: ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h cg2_shcrv.c
cg2_shrop.o: ../../graphics/trap_step.h ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h cg2_shrop.c
cg2_shtext.o: ../../include/font.h ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h cg2_shtext.c
gen_rplrop.o: ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h gen_rplrop.c
gp1_rop.o: ../../include/pixrect/pixrect.h gp1_rop.c
gp1_shrop.o: ../../graphics/trap_step.h ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h gp1_shrop.c
gp1_shtext.o: ../../include/font.h ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h gp1_shtext.c
mem_rop.o: ../../include/fract.h ../../include/pixrect/mem_rop_impl_ops.h ../../include/pixrect/pixrect.h ../../include/shape.h mem_rop.c
mem_shcrv.o: ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h mem_shcrv.c
mem_shtext.o: ../../include/font.h ../../include/fract.h ../../include/pixrect/pixrect.h ../../include/shape.h mem_shtext.c
mem_vec.o: ../../include/pixrect/pixrect.h mem_vec.c
pixrectint.o: ../../include/pixrect/pixrect.h pixrectint.c
pr_io.o: ../../include/pixrect/pixrect.h ../../include/psio.h ../../include/rasterfile.h pr_io.c
pr_make.o: ../../include/pixrect/pixrect.h pr_make.c
pr_makefun.o: ../../include/pixrect/pixrect.h ../../include/rasterfile.h pr_makefun.c
pr_open.o: ../../include/pixrect/pixrect.h pr_open.c
