#==============================================================================
#                              libsipp/Makefile
#------------------------------------------------------------------------------
# Makefile to for SIPP 3.0 libsipp source.
#------------------------------------------------------------------------------
# $Id: Makefile,v 4.0 1993/11/27 21:26:26 markd Rel $
#------------------------------------------------------------------------------

include ../Config.mk
SHELL=/bin/sh

#-----------------------------------------------------------------------------

MLIBDIR  = ../master/lib${ARCH}
LIBTSIPP = ${MLIBDIR}/libtsipp.a

#-----------------------------------------------------------------------------

OBJS = rendering.o geometric.o lightsource.o objects.o smalloc.o \
       transforms.o viewpoint.o basic_shader.o marble.o granite.o mask.o\
       bozo.o bumpy.o planet.o noise.o bezier.o bezier_lex.o pixel.o\
       torus.o cone.o ellipsoid.o prism.o sipp_pixmap.o sipp_bitmap.o\
       wood.o xalloca.o phong.o strauss.o

DEFS = ${ALLOCA}
INCL = -I.

CC_FLAGS = ${CPPFLAGS} ${XCFLAGS} ${CFLAGS} ${CCOPT} ${INCL} ${DEFS}
 
.c.o:
	${CC} ${CC_FLAGS} -c $<

#-----------------------------------------------------------------------------

all: made.tmp

made.tmp: ${OBJS}
	test -d ${MLIBDIR} || mkdir ${MLIBDIR}
	${AR} cru ${LIBTSIPP} ${OBJS}
	${RANLIB} ${LIBTSIPP}
	touch made.tmp

bezier_lex.c: bezier_lex.l
	${LEX} bezier_lex.l
	mv lex.yy.c bezier_lex.c

#-----------------------------------------------------------------------------

clean: 
	rm -f ${OBJS} bezier_lex.c made.tmp

#-----------------------------------------------------------------------------

rendering.o:         sipp.h rendering.h lightsource.h geometric.h \
                     objects.h sipp_bitmap.h viewpoint.h
geometric.o:         geometric.h sipp.h
lightsource.o:       geometric.h lightsource.h sipp.h
objects.o:           sipp.h
pixel.o:             pixel.h sipp.h
smalloc.o:           
transforms.o:        geometric.h sipp.h
viewpoint.o:         geometric.h smalloc.h viewpoint.h sipp.h
basic_shader.o:      sipp.h geometric.h
strauss.o:           sipp.h shaders.h geometric.h
mask.o:              shaders.h sipp.h
marble.o:            noise.h shaders.h sipp.h
granite.o:           noise.h shaders.h sipp.h
bozo.o:              noise.h shaders.h sipp.h
bumpy.o:             noise.h shaders.h sipp.h geometric.h
planet.o:            noise.h sipp.h geometric.h
wood.o:              noise.h shaders.h sipp.h
phong.o:             sipp.h shaders.h geometric.h
noise.o:             noise.h sipp.h
bezier.o:            bezier.h sipp.h  primitives.h
bezier_lex.o:        bezier_lex.c bezier.h
torus.o:             sipp.h primitives.h
ellipsoid.o:         sipp.h primitives.h
prism.o:             sipp.h primitives.h
cone.o:              sipp.h primitives.h
sipp_pixmap.o:       sipp_pixmap.h sipp.h
sipp_bitmap.o:       sipp_bitmap.h sipp.h
xalloca.o:           xalloca.h
