• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2013-2016 The Khronos Group Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Generated headers
16EGLHEADERS = EGL/egl.h EGL/eglext.h
17
18# Generation tools
19PYTHON = python
20PYFILES = genheaders.py reg.py
21REGISTRY = egl.xml
22GENOPTS =
23GENHEADERS = $(PYTHON) -B genheaders.py $(GENOPTS) -registry $(REGISTRY)
24
25all: $(EGLHEADERS)
26
27EGL/egl.h: egl.xml $(PYFILES)
28	$(GENHEADERS) EGL/egl.h
29
30EGL/eglext.h: egl.xml $(PYFILES)
31	$(GENHEADERS) EGL/eglext.h
32
33# Simple test to make sure generated headers compile
34KHR   = .
35TESTS = Tests
36
37tests: egltest.c $(EGLHEADERS)
38	$(CC) -c -I$(KHR) egltest.c
39	$(CXX) -c -I$(KHR) egltest.c
40	-rm egltest.o
41
42# Verify registries against the schema
43
44validate:
45	jing -c registry.rnc egl.xml
46
47################################################
48
49# Remove intermediate targets from 'make tests'
50clean:
51	rm -f *.[io] Tests/*.[io] diag.txt dumpReg.txt errwarn.txt
52
53clobber: clean
54	rm -f $(EGLHEADERS)
55