| # Copyright (c) 2013-2017 The Khronos Group Inc. | 
 | # | 
 | # Licensed under the Apache License, Version 2.0 (the "License"); | 
 | # you may not use this file except in compliance with the License. | 
 | # You may obtain a copy of the License at | 
 | # | 
 | #     http://www.apache.org/licenses/LICENSE-2.0 | 
 | # | 
 | # Unless required by applicable law or agreed to in writing, software | 
 | # distributed under the License is distributed on an "AS IS" BASIS, | 
 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
 | # See the License for the specific language governing permissions and | 
 | # limitations under the License. | 
 |  | 
 | # Generator scripts and options | 
 | # GENOPTS can be e.g. '-noprotect' | 
 |  | 
 | PYFILES = genheaders.py reg.py | 
 | GENOPTS = | 
 | GENHEADERS = genheaders.py $(GENOPTS) | 
 |  | 
 | # Generate all headers for GL / GLES / WGL / GLX | 
 | # Different headers depend on different XML registry files | 
 | # The $(GENHEADERS) script has targets for the additional headers | 
 | #   $(API)/GL/gl.h | 
 | #   $(API)/GL/glx.h | 
 | #   $(API)/GL/wgl.h | 
 | # but these are experimental and not supported by Khronos. OpenGL | 
 | # drivers and SDKs provided by OS vendors and IHVs include their own | 
 | # platform-specific versions of these headers, where appropriate. | 
 |  | 
 | API	   = ../api | 
 | GLHEADERS  = $(API)/GL/glext.h \ | 
 | 	     $(API)/GL/glcorearb.h \ | 
 | 	     $(API)/GLES/gl.h \ | 
 | 	     $(API)/GLES/glext.h \ | 
 | 	     $(API)/GLES2/gl2.h \ | 
 | 	     $(API)/GLES2/gl2ext.h \ | 
 | 	     $(API)/GLES3/gl3.h | 
 | GLXHEADERS = $(API)/GL/glxext.h | 
 | WGLHEADERS = $(API)/GL/wglext.h | 
 | ALLHEADERS = $(GLHEADERS) $(GLXHEADERS) $(WGLHEADERS) | 
 |  | 
 | # Generated files to clean up | 
 | TEXDIRT = readme.aux readme.idx readme.ilg readme.ind readme.log readme.toc readme.out | 
 | PYDIRT	= diag.txt dumpReg.txt errwarn.txt reg.pyc | 
 |  | 
 | default: $(ALLHEADERS) | 
 |  | 
 | $(GLHEADERS): gl.xml $(PYFILES) | 
 | 	$(GENHEADERS) $@ | 
 |  | 
 | $(GLXHEADERS): glx.xml $(PYFILES) | 
 | 	$(GENHEADERS) $@ -registry glx.xml | 
 |  | 
 | $(WGLHEADERS): wgl.xml $(PYFILES) | 
 | 	$(GENHEADERS) $@ -registry wgl.xml | 
 |  | 
 | # Generate Relax NG XML schema from Compact schema | 
 |  | 
 | registry.rng: registry.rnc | 
 | 	trang registry.rnc registry.rng | 
 |  | 
 | # Verify all registry XML files against the schema | 
 |  | 
 | validate: | 
 | 	jing -c registry.rnc gl.xml | 
 | 	jing -c registry.rnc glx.xml | 
 | 	jing -c registry.rnc wgl.xml | 
 |  | 
 | # Documentation target | 
 |  | 
 | readme.pdf: readme.tex | 
 | 	touch readme.ind | 
 | 	pdflatex readme.tex | 
 | 	pdflatex readme.tex | 
 | 	makeindex readme.idx | 
 | 	pdflatex readme.tex | 
 |  | 
 | clean: | 
 | 	-rm -f $(PYDIRT) $(TEXDIRT) |