1# Copyright 2013-2020 The Khronos Group Inc. 2# SPDX-License-Identifier: Apache-2.0 3 4# Generated headers 5EGLHEADERS = EGL/egl.h EGL/eglext.h 6 7# Generation tools 8PYTHON = python3 9PYFILES = genheaders.py reg.py 10REGISTRY = egl.xml 11GENOPTS = 12GENHEADERS = $(PYTHON) -B genheaders.py $(GENOPTS) -registry $(REGISTRY) 13 14all: $(EGLHEADERS) 15 16EGL/egl.h: egl.xml $(PYFILES) 17 $(GENHEADERS) EGL/egl.h 18 19EGL/eglext.h: egl.xml $(PYFILES) 20 $(GENHEADERS) EGL/eglext.h 21 22# Simple test to make sure generated headers compile 23KHR = . 24TESTS = Tests 25 26tests: egltest.c $(EGLHEADERS) 27 $(CC) -c -I$(KHR) egltest.c 28 $(CXX) -c -I$(KHR) egltest.c 29 -rm egltest.o 30 31# Verify registries against the schema 32 33validate: 34 jing -c registry.rnc egl.xml 35 36################################################ 37 38# Remove intermediate targets from 'make tests' 39clean: 40 rm -f *.[io] Tests/*.[io] diag.txt dumpReg.txt errwarn.txt 41 42clobber: clean 43 rm -f $(EGLHEADERS) 44