
GFX_OGL_OBJS= OpenGL/mav_gfx.o OpenGL/mav_gfxWM.o
GFX_IGL_OBJS= IrisGL/mav_gfx.o IrisGL/mav_gfxWM.o
GFX_NONE_OBJS= None/mav_gfx.o None/mav_gfxWM.o

LIBS=   ../../lib/libmav_gfxOpenGL${OPT_EXT}.so ${IRISGL} ../../lib/libmav_gfxNone${OPT_EXT}.so

all:    ${LIBS}

OpenGL/mav_gfx.o:	mav_gfx.c
	${CC} -I../../incl ${OPENGLINCL} ${CFLAG} -DMAV_OPENGL -c mav_gfx.c -o OpenGL/mav_gfx.o
OpenGL/mav_gfxWM.o:	mav_gfxWM.c
	${CC} -I../../incl ${OPENGLINCL} ${CFLAG} -DMAV_OPENGL -c mav_gfxWM.c -o OpenGL/mav_gfxWM.o


IrisGL/mav_gfx.o:	mav_gfx.c
	${CC} -I../../incl ${CFLAG} -DMAV_IRISGL -c mav_gfx.c -o IrisGL/mav_gfx.o
IrisGL/mav_gfxWM.o:	mav_gfxWM.c
	${CC} -I../../incl ${CFLAG} -DMAV_IRISGL -c mav_gfxWM.c -o IrisGL/mav_gfxWM.o


None/mav_gfx.o:		mav_gfx.c
	${CC} -I../../incl ${CFLAG} -DMAV_NONE -c mav_gfx.c -o None/mav_gfx.o
None/mav_gfxWM.o:	mav_gfxWM.c
	${CC} -I../../incl ${CFLAG} -DMAV_NONE -c mav_gfxWM.c -o None/mav_gfxWM.o


../../lib/libmav_gfxOpenGL${OPT_EXT}.so: ${GFX_OGL_OBJS}
	${LD} -o libmav_gfxOpenGL${OPT_EXT}.so ${GFX_OGL_OBJS} ${OPENGLLIBS}
	mv libmav_gfxOpenGL${OPT_EXT}.so ../../lib

../../lib/libmav_gfxIrisGL${OPT_EXT}.so: ${GFX_IGL_OBJS}
	${LD} -o libmav_gfxIrisGL${OPT_EXT}.so ${GFX_IGL_OBJS} ${IRISGLLIBS}
	mv libmav_gfxIrisGL${OPT_EXT}.so ../../lib

../../lib/libmav_gfxNone${OPT_EXT}.so: ${GFX_NONE_OBJS}
	${LD} -o libmav_gfxNone${OPT_EXT}.so ${GFX_NONE_OBJS} ${NONEGFXLIBS}
	mv libmav_gfxNone${OPT_EXT}.so ../../lib

clean:
	rm -f ${GFX_OGL_OBJS}
	rm -f ${GFX_IGL_OBJS}
	rm -f ${GFX_NONE_OBJS}
