#
# Makefile for penguin example (UNIX).
-PROGRAM=penguin
+OPENGL_LIBS=-lGL -lGLU
+#if you have old Mesa, try this:
+#OPENGL_LIBS=-lMesaGL -lMesaGLU
-OPENGLHOME=/home/jacs/mesa/Mesa-2.3
+CPP = g++
+CC = gcc
-EXTRACPPFLAGS=-I$(OPENGLHOME)/include # -I../../motif
-EXTRALDFLAGS=-L$(OPENGLHOME)/lib
-EXTRALDLIBS=-lMesaGL -lMesaGLU
+Penguin: penguin.o trackball.o lw.o
+ $(CPP) -o Penguin \
+ penguin.o trackball.o lw.o \
+ `wx-config --libs` -lwx_gtk_gl $(OPENGL_LIBS)
-OBJECTS=$(PROGRAM).o trackball.o lw.o
+penguin.o: penguin.cpp
+ $(CPP) `wx-config --cflags` -I../../gtk -c penguin.cpp
-include ../../../src/makeprog.env
+lw.o: lw.cpp
+ $(CPP) `wx-config --cflags` -I../../gtk -c lw.cpp
+
+trackball.o: trackball.c
+ $(CC) `wx-config --cflags` -I../../gtk -c trackball.c
+
+clean:
+ rm -f *.o Penguin