diff --git a/samples/opengl/cube/makefile.unx b/samples/opengl/cube/makefile.unx index afa6121f6f..f40497b3e5 100644 --- a/samples/opengl/cube/makefile.unx +++ b/samples/opengl/cube/makefile.unx @@ -9,6 +9,10 @@ # # Makefile for cube example (UNIX). +OPENGL_LIBS=-lGL -lGLU +#if you have old Mesa, try this: +#OPENGL_LIBS=-lMesaGL -lMesaGLU + PROGRAM=cube CC = gcc @@ -25,7 +29,7 @@ OBJECTS = $(PROGRAM).o all: $(PROGRAM) $(PROGRAM): $(OBJECTS) - $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU + $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl $(OPENGL_LIBS) clean: rm -f *.o $(PROGRAM) diff --git a/samples/opengl/isosurf/makefile.unx b/samples/opengl/isosurf/makefile.unx index fbb993eb4c..86c4c5a6a4 100644 --- a/samples/opengl/isosurf/makefile.unx +++ b/samples/opengl/isosurf/makefile.unx @@ -9,6 +9,10 @@ # # Makefile for isosurf example (UNIX). +OPENGL_LIBS=-lGL -lGLU +#if you have old Mesa, try this: +#OPENGL_LIBS=-lMesaGL -lMesaGLU + PROGRAM=isosurf CC = gcc @@ -25,7 +29,7 @@ OBJECTS = $(PROGRAM).o all: $(PROGRAM) isosurf.dat $(PROGRAM): $(OBJECTS) - $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU + $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl $(OPENGL_LIBS) clean: rm -f *.o $(PROGRAM) diff --git a/samples/opengl/penguin/makefile.unx b/samples/opengl/penguin/makefile.unx index 2add0896b3..aaea80b74b 100644 --- a/samples/opengl/penguin/makefile.unx +++ b/samples/opengl/penguin/makefile.unx @@ -7,13 +7,17 @@ # # Makefile for penguin example (UNIX). +OPENGL_LIBS=-lGL -lGLU +#if you have old Mesa, try this: +#OPENGL_LIBS=-lMesaGL -lMesaGLU + CPP = g++ CC = gcc Penguin: penguin.o trackball.o lw.o $(CPP) -o Penguin \ penguin.o trackball.o lw.o \ - `wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU + `wx-config --libs` -lwx_gtk_gl $(OPENGL_LIBS) penguin.o: penguin.cpp $(CPP) `wx-config --cflags` -I../../gtk -c penguin.cpp