8 |
|
|
9 |
CTOBJS=calltest.o callgl.o ../libutil/Debug.o |
CTOBJS=calltest.o callgl.o ../libutil/Debug.o |
10 |
|
|
11 |
|
# FIXME: needs more libraries to link with |
12 |
calltest: $(CTOBJS) |
calltest: $(CTOBJS) |
13 |
$(CXX) $(CTOBJS) -o calltest -lglut -lGL -lGLU |
$(CXX) $(CTOBJS) -o calltest -lglut -lGL -lGLU |
14 |
|
|
|
callgl.cxx: gltokens.c |
|
15 |
|
|
16 |
|
# gltokens.c is currently in cvs to prevent potential problems |
17 |
# original |
# with different OpenGL headers. |
18 |
|
# To enable automatic gltokens.c regeneration, remove the XXX_'s below |
19 |
#gltokens.c: Makefile /usr/include/GL/gl.h /usr/include/GL/glext.h |
# and check that CPPFLAGS specifies the correct OpenGL include directories. |
20 |
# grep -h '#define GL_\w\+[[:space:]]\+\w\+' /usr/include/GL/gl.h /usr/include/GL/glext.h $(NVIDIAH)/GL/gl.h | grep -v 'OFFSET_TEXTURE_2D_[BMS]' | cut -c12- | awk '{print "{\"" $$1 "\", " $$2 "},"}' | LC_COLLATE=C sort| uniq > gltokens.c |
XXX_gltokens.dep: |
21 |
|
echo '#include <GL/gl.h>' | \ |
22 |
|
cpp $(CPPFLAGS) -DGL_GLEXT_PROTOTYPES - -M | \ |
23 |
# with libgwrapper |
sed -e 's/^-/gltokens.c gltokens.dep/' > gltokens.dep |
24 |
|
|
25 |
GL_HEADER= ../libglwrapper/GL/gl.h /usr/include/GL/glext.h |
include XXX_gltokens.dep |
26 |
gltokens.c: Makefile $(GL_HEADER) |
|
27 |
grep -h '#define GL_\w\+[[:space:]]\+\w\+' $(GL_HEADER) | grep -v 'OFFSET_TEXTURE_2D_[BMS]' | cut -c12- | awk '{print "{\"" $$1 "\", " $$2 "},"}' | LC_COLLATE=C sort| uniq > gltokens.c |
XXX_gltokens.c: |
28 |
|
echo '#include <GL/gl.h>' | \ |
29 |
|
cpp $(CPPFLAGS) -DGL_GLEXT_PROTOTYPES - -dM | \ |
30 |
|
grep -h '#define GL_\w\+[[:space:]]\+\w\+' | \ |
31 |
|
grep -v 'OFFSET_TEXTURE_2D_[BMS]' | cut -c12- | \ |
32 |
|
awk '{print "{\"" $$1 "\", " $$2 "},"}' | \ |
33 |
|
LC_COLLATE=C sort | uniq > gltokens.c |