File: Makefile

package info (click to toggle)
khronos-api 4.6%2Bgit20220505-1
  • links: PTS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 3,508 kB
  • sloc: xml: 50,744; python: 1,681; makefile: 51; ansic: 23; php: 18; sh: 3
file content (71 lines) | stat: -rw-r--r-- 1,863 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Copyright 2013-2020 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0

# 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 \
	     $(API)/GL/wgl.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)