PROGRAM=cube
-OPENGLHOME=/home/jacs/mesa/Mesa-2.3
+CC = gcc
-EXTRACPPFLAGS=-I$(OPENGLHOME)/include
-EXTRALDFLAGS=-L$(OPENGLHOME)/lib
-EXTRALDLIBS=-lMesaGL -lMesaGLU
+OBJECTS = $(PROGRAM).o
-OBJECTS=$(PROGRAM).o
+# implementation
-include ../../../src/makeprog.env
+.SUFFIXES: .o .cpp
+.cpp.o :
+ $(CC) -c `wx-config --cflags` -o $@ $<
+
+all: $(PROGRAM)
+
+$(PROGRAM): $(OBJECTS)
+ $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU
+
+clean:
+ rm -f *.o $(PROGRAM)