[Gllug] Makefile for OpenGL / GLUT
Henry Gilbert
henry.gilbert at gmail.com
Thu Jul 17 18:58:03 UTC 2008
Hi,
I've been trying to compile some OpenGL exercises in Linux, but the
Makefile code offered by the book doesn't quite work:
INCPATH = -I/usr/X11R6/include/
LIBS = -lglut -lGLU -lGL -lm -lpthread
LIBPATH = -L/usr/lib /usr/X11R6/lib/
%:%.c
gcc $(INCPATH) $(LIBPATH) $^ $(LIBS) -o $@
%:%.cpp
g++ $(INCPATH) %(LIBPATH) $^ $(LIBS) -o $@
But when I type a full compilation command:
g++ -o Example Example.cpp -I /usr/X11R6/include/ -L /usr/X11R6/lib/
-lglut -lGL -lGLU -lX11 -lXmu -lXi -lm
That works fine.
Would anyone know how to edit the Makefile to make 'make' work instead?
kind regards
Henry Gilbert
--
SEO Mastery
http://www.alliancetec.com
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list