#
# Makefile for cube example (UNIX).
+OPENGL_LIBS=-lGL -lGLU
+#if you have old Mesa, try this:
+#OPENGL_LIBS=-lMesaGL -lMesaGLU
+
PROGRAM=cube
-OPENGLHOME=/home/jacs/mesa/Mesa-2.3
+CC = gcc
+
+OBJECTS = $(PROGRAM).o
+
+# implementation
+
+.SUFFIXES: .o .cpp
-EXTRACPPFLAGS=-I$(OPENGLHOME)/include
-EXTRALDFLAGS=-L$(OPENGLHOME)/lib
-EXTRALDLIBS=-lMesaGL -lMesaGLU
+.cpp.o :
+ $(CC) -c `wx-config --cflags` -o $@ $<
-OBJECTS=$(PROGRAM).o
+all: $(PROGRAM)
-include ../../../src/makeprog.env
+$(PROGRAM): $(OBJECTS)
+ $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl $(OPENGL_LIBS)
+clean:
+ rm -f *.o $(PROGRAM)