#
# Makefile for isosurf example (UNIX).
+OPENGL_LIBS=-lGL -lGLU
+#if you have old Mesa, try this:
+#OPENGL_LIBS=-lMesaGL -lMesaGLU
+
PROGRAM=isosurf
-CC = gcc
+CXX = $(shell wx-config --cxx)
OBJECTS = $(PROGRAM).o
.SUFFIXES: .o .cpp
.cpp.o :
- $(CC) -c `wx-config --cflags` -o $@ $<
+ $(CXX) -c `wx-config --cxxflags` -o $@ $<
all: $(PROGRAM) isosurf.dat
$(PROGRAM): $(OBJECTS)
- $(CC) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl -lMesaGL -lMesaGLU
+ $(CXX) -o $(PROGRAM) $(OBJECTS) `wx-config --libs` -lwx_gtk_gl $(OPENGL_LIBS)
clean:
rm -f *.o $(PROGRAM)