# $Id: Makefile,v 3.3 1998/06/10 02:52:20 brianp Exp $

# Mesa 3-D graphics library
# Version:  3.0
# Copyright (C) 1995-1998  Brian Paul
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


# Makefile for GLUT-based demo programs for Unix/X11

# adapted for FreeBSD by Marc van Woerkom


##### MACROS #####
CC=gcc
CFLAGS=-O3 -fomit-frame-pointer -fexpensive-optimizations
XLIBS=-lXmu

X11DIR=/usr/X11R6
INCDIR = ${X11DIR}/include
LIBDIR = ${X11DIR}/lib

GL_LIBS = -L${LIBDIR} -lglut -lGLU -lGL -lm ${XLIBS}

PROGS = bounce.hw clearspd.hw drawpix.hw gamma.hw gears.hw glinfo.hw glutfx.hw isosurf.hw \
	morph3d.hw multiext.hw multitex.hw paltex.hw pointblast.hw reflect.hw \
	renormal.hw spectex.hw tessdemo.hw texcyl.hw texobj.hw trispd.hw winpos.hw
# these don't compile with glx :-(
# osdemo stex3d


PROGS2 = gears.hw glinfo.hw glutfx.hw isosurf.hw \
	morph3d.hw multiext.hw multitex.hw paltex.hw pointblast.hw reflect.hw \
	renormal.hw spectex.hw tessdemo.hw texcyl.hw texobj.hw



##### RULES #####

.SUFFIXES:
.SUFFIXES: .c .hw

.c.hw:
	${CC} -I${INCDIR} ${CFLAGS} $< ${GL_LIBS} -o $@



##### TARGETS #####

default: targets

clean:
	-rm *.o *~

realclean:
	-rm ${PROGS}
	-rm *.o *~

targets: ${PROGS}

# execute all programs
exec: ${PROGS}
	-./gears.hw 
	-./glinfo.hw 
	-./glutfx.hw 
	-./isosurf.hw 
	-./morph3d.hw 
	-./multiext.hw 
	-./multitex.hw 
	-./paltex.hw 
	-./pointblast.hw 
	-./reflect.hw
	-./renormal.hw 
	-./spectex.hw 
	@echo ""
	@echo "use mouse button 2 for menu! (texture and reflection)"
	-./texcyl.hw 
	-./texobj.hw


