# C compiler 
CC=gcc
# CC flags for normal gcc
#CFLAGS=-O6 -Winline -Wpointer-arith -Wcast-align -Wbad-function-cast

# These flags are for pgcc, software-pipe seems unstable and break the lib
# so zap it out.
CFLAGS=-O6 -fno-software-pipe -mpentium -Winline -Wpointer-arith -Wcast-align -Wbad-function-cast

# Flags to build a dynamic lib
SHAREDFLAGS=-shared

# ar binary and flags to create a lib
LIB=ar
LIBFLAGS=rc

# Modify the following path to match your system
# X Window
XLIB=/usr/X11/lib
XINC=/usr/X11/include

# 3Dfx's Glide 
GLIDEINC=/usr/local/glide/include
GLIDELIB=/usr/local/glide/lib

# Your OpenGL implementation
GLLIB=/usr/local/lib/libMesaGL.so /usr/local/lib/libMesaGLU.so
GLINC=/usr/local/include

# Where is your jpeg library
JPEGLIB=/usr/lib/libjpeg.a
JPEGINC=/usr/include

############################################################

# File suffix definitions
   L            := .a     # Libraries
   E            :=        # Executables
   O            := .o     # Objects
   A            := .s     # Assembler sources
   P            := .cpp   # C++ sources
   S			:= .so	  # Shared lib

# Implicit generation rules for making object files
   %$O: %.c ; $(CC) $(CFLAGS) -x c++ -c $<
   %$O: %$P ; $(CC) $(CFLAGS) -c $<

# Implicit rule for building a library file
   %$L:      ; $(LIB) $(LIBFLAGS) $@ $^
	       	   ranlib $@
