# $Id: Makefile,v 1.4 1998/10/13 16:15:15 claudio Exp $
#--------------------------------------------------------------------------
# Ah, an old style "edit yourself the Makefile" configuration system!
# Isn't it wonderful?
#--------------------------------------------------------------------------

# Where you want to have it installed
BINDIR	= /usr/X11/bin
MANDIR	= /usr/X11/man/man1

# Use these for Mesa
#GL	= -lglut -lMesaGLU -lMesaGL

# Use these for OpenGL
GL	= -lglut -lGLU -lGL

# Use these for gcc on Linux (may work in other systems as well)
CC	= gcc
CFLAGS	= -O3 -fomit-frame-pointer -ffast-math -Wall -Wno-implicit-int
LD	= gcc
LDFLAGS	= -o $@
LIBS	= -L/usr/X11/lib -L/usr/local/lib $(GL) -lX11 -lXext -lXmu -lXi -lm

# Use these for cc on IRIX (submitted by Andrew Dalke <dalke@bioreason.com>)
#CC	= cc
#CFLAGS	= -O
#LD	= cc
#LDFLAGS	= -o $@
#LIBS	= -L/usr/X11/lib -L/usr/local/lib $(GL) -lX11 -lXext -lXmu -lm

# Uncomment if you don't have getopt()
#GETOPT	= getopt.o

# Set the update period and the number of slices and stacks for the eyeball
# model. Default is 120ms, 20 slices and 10 stacks.
#OPTIONS	= -DTIMER=100 -DSLICES=32 -DSTACKS=16

#--------------------------------------------------------------------------
# End of configuration
#--------------------------------------------------------------------------

VERSION	= 0.2
DIST	= gleyes-$(VERSION)
OBJS	= gleyes.o iris.o $(GETOPT)
DFILES	= README COPYING ChangeLog Makefile Makefile.win32 gleyes.1 gleyes.c \
	  iris.c getopt.c glutint.h iris.tiff

.c.o:
	$(CC) -c $(CFLAGS) $(OPTIONS) -DVERSION='"$(VERSION)"' -o $*.o $<

gleyes: $(OBJS)
	$(LD) $(LDFLAGS) $(OBJS) $(LIBS)

all: gleyes

clean:
	rm -f *.o core

install: gleyes
	cp gleyes $(BINDIR)
	cp gleyes.1 $(MANDIR)

dist:
	rm -Rf $(DIST) $(DIST).tar.gz
	mkdir $(DIST)
	cp $(DFILES) $(DIST)
	tar cvf - $(DIST) | gzip -9c > $(DIST).tar.gz
	rm -Rf $(DIST)
	sync

gleyes gleyes.o iris.o: Makefile


# "I've seen things you people wouldn't believe.
#  Attack ships on fire off the shoulder of Orion.
#  I watched C-beams glitter in the dark near the Tannhauser gate.
#  All those moments will be lost in time
#  Like tears in rain.
#  Time to die."
#					-- Roy Batty
