15 |
|
|
16 |
# gltokens.c is currently in cvs to prevent potential problems |
# gltokens.c is currently in cvs to prevent potential problems |
17 |
# with different OpenGL headers. |
# with different OpenGL headers. |
18 |
# To enable automatic gltokens.c regeneration, remove the XXX_'s below |
# To enable automatic gltokens.c regeneration, remove the XXX_ below |
19 |
# and check that CPPFLAGS specifies the correct OpenGL include directories. |
# and check that CPPFLAGS specifies the correct OpenGL include directories. |
|
XXX_gltokens.dep: |
|
|
echo '#include <GL/gl.h>' | \ |
|
|
cpp $(CPPFLAGS) -DGL_GLEXT_PROTOTYPES - -M | \ |
|
|
sed -e 's/^-/gltokens.c gltokens.dep/' > gltokens.dep |
|
|
|
|
|
include XXX_gltokens.dep |
|
|
|
|
20 |
XXX_gltokens.c: |
XXX_gltokens.c: |
21 |
echo '#include <GL/gl.h>' | \ |
echo '#include <GL/gl.h>' | \ |
22 |
cpp $(CPPFLAGS) -DGL_GLEXT_PROTOTYPES - -dM | \ |
$(CXX) -E $(CPPFLAGS) -DGL_GLEXT_PROTOTYPES - -dM | \ |
23 |
grep -h '#define GL_\w\+[[:space:]]\+\w\+' | \ |
grep -h '#define GL_\w\+[[:space:]]\+\w\+' | \ |
24 |
grep -v 'OFFSET_TEXTURE_2D_[BMS]' | cut -c12- | \ |
grep -v 'OFFSET_TEXTURE_2D_[BMS]' | cut -c12- | \ |
25 |
awk '{print "{\"" $$1 "\", " $$2 "},"}' | \ |
awk '{print "{\"" $$1 "\", " $$2 "},"}' | \ |
26 |
LC_COLLATE=C sort | uniq > gltokens.c |
LC_COLLATE=C sort | uniq > gltokens.c |
27 |
|
|
28 |
|
gltokens.dep: |
29 |
|
echo '#include <GL/gl.h>' | \ |
30 |
|
$(CXX) -E $(CPPFLAGS) -DGL_GLEXT_PROTOTYPES - -M | \ |
31 |
|
sed -e 's/^-/gltokens.c gltokens.dep/' > gltokens.dep |
32 |
|
|
33 |
|
include gltokens.dep |