     ## Process this file with automake to produce Makefile.in


##
## Declarations of the source files .. this should be probably read in through
## a file ???
##

bd = ../Base
cd = ../Control
md = ../Manips
gd = ../Geos
nd = ../NonGeos
pd = ../Pixes

BASE_CORE = $(bd)/CPPExtern.cpp $(bd)/GemMan.cpp $(cd)/gemhead.cpp $(bd)/GemBase.cpp $(bd)/sgiimage.cpp
BASE_EXT = $(bd)/GemShape.cpp $(bd)/TextBase.cpp $(bd)/GemGluObj.cpp $(bd)/GemPixObj.cpp $(bd)/GemPixDualObj.cpp
BASE_OBJ = ${BASE_CORE} ${BASE_EXT}
UTILS_BASE = $(bd)/GemSetup.cpp $(bd)/GemState.cpp $(bd)/GemCache.cpp $(bd)/GemDag.cpp
UTILS_PIX = $(bd)/GemPixUtil.cpp $(bd)/GemPixImageLoad.cpp
UTILS_OS = $(bd)/GemWinCreateXWin.cpp
UTILS = ${UTILS_BASE} ${UTILS_PIX} ${UTILS_OS}

CONTROLS = $(cd)/gemwin.cpp $(cd)/camera.cpp $(cd)/render_trigger.cpp
MANIPS_A = $(md)/translateXYZ.cpp $(md)/scaleXYZ.cpp $(md)/colorRGB.cpp
MANIPS_B = $(md)/rotate.cpp $(md)/translate.cpp $(md)/scale.cpp $(md)/color.cpp $(md)/depth.cpp $(md)/alpha.cpp $(md)/separator.cpp
MANIPULATORS = ${MANIPS_A} ${MANIPS_B}
TWODGEOS = $(gd)/square.cpp $(gd)/triangle.cpp $(gd)/circle.cpp $(gd)/text2d.cpp
THREEDGEOS = $(gd)/cube.cpp $(gd)/cone.cpp $(gd)/sphere.cpp $(gd)/imageVert.cpp $(gd)/text3d.cpp $(gd)/textoutline.cpp
SPEC_GEOS = $(gd)/polygon.cpp $(gd)/model.cpp $(gd)/multimodel.cpp $(gd)/curve.cpp $(gd)/colorSquare.cpp
GEOS = ${TWODGEOS} ${THREEDGEOS} ${SPEC_GEOS}

NONGEOS = $(nd)/world_light.cpp  $(nd)/light.cpp
PIX_GEOS = $(pd)/pix_image.cpp $(pd)/pix_multiimage.cpp $(pd)/pix_texture.cpp $(pd)/pix_draw.cpp $(pd)/pix_snap.cpp
PIX_CONTROLS = $(pd)/pix_resize.cpp $(pd)/pix_buf.cpp $(pd)/pix_zoom.cpp
PIX_MANA = $(pd)/pix_add.cpp $(pd)/pix_subtract.cpp $(pd)/pix_multiply.cpp
PIX_MANB = $(pd)/pix_threshold.cpp $(pd)/pix_gain.cpp $(pd)/pix_color.cpp $(pd)/pix_bitmask.cpp $(pd)/pix_flip.cpp
PIX_MANC = $(pd)/pix_colormatrix.cpp $(pd)/pix_alpha.cpp $(pd)/pix_convolve.cpp $(pd)/pix_composite.cpp
PIX_MAND = $(pd)/pix_coloralpha.cpp $(pd)/pix_mask.cpp $(pd)/pix_clearblock.cpp
PIX_MANE = $(pd)/pix_coordinate.cpp $(pd)/pix_2grey.cpp $(pd)/pix_invert.cpp
PIX_MANIPS = ${PIX_MANA} ${PIX_MANB} ${PIX_MANC} ${PIX_MAND} ${PIX_MANE}
PIXES = ${PIX_GEOS} ${PIX_CONTROLS} ${PIX_MANIPS}


## Finally I got the damn vpath working here, but probably just for
## gnu make ??

vpath %.cpp @source_dirs@

##
## Classical automake stuff
##

gemdir = $(libdir)/gem

Gem_pd_SOURCES = ${BASE_OBJ} ${UTILS} ${CONTROLS} ${MANIPULATORS} \
      ${GEOS} ${NONGEOS} ${PIXES} ${SGI_SPECIFIC} 

Gem_pd_LDADD = @arch_ld_flags@

noinst_PROGRAMS = Gem.pd

##
## Additional Makefile rules
##

all:
	cp Gem.pd ../../Gem.@target@

clean:
	rm ../../Gem.@target@