2 MAPI
= $(TOP
)/src
/mapi
/mapi
4 include $(TOP
)/configs
/current
11 COMMON
= gl_and_es_API.xml gl_XML.py glX_XML.py license.py typeexpr.py
12 COMMON
:= $(addprefix $(GLAPI
)/, $(COMMON
))
14 ES1_APIXML
:= es1_API.xml
15 ES2_APIXML
:= es2_API.xml
16 ES1_OUTPUT_DIR
:= $(TOP
)/src
/mapi
/es1api
17 ES2_OUTPUT_DIR
:= $(TOP
)/src
/mapi
/es2api
19 ES1_DEPS
= $(ES1_APIXML
) base1_API.xml es1_EXT.xml es_EXT.xml \
20 es1_COMPAT.xml es_COMPAT.xml
21 ES2_DEPS
= $(ES2_APIXML
) base2_API.xml es2_EXT.xml es_EXT.xml \
22 es2_COMPAT.xml es_COMPAT.xml
24 ES1_OUTPUTS
:= $(addprefix $(ES1_OUTPUT_DIR
)/, $(OUTPUTS
))
25 ES2_OUTPUTS
:= $(addprefix $(ES2_OUTPUT_DIR
)/, $(OUTPUTS
))
27 SHARED_GLAPI_APIXML
:= $(GLAPI
)/gl_and_es_API.xml
28 SHARED_GLAPI_OUTPUT_DIR
:= $(TOP
)/src
/mapi
/shared-glapi
29 SHARED_GLAPI_DEPS
:= $(SHARED_GLAPI_APIXML
)
30 SHARED_GLAPI_OUTPUTS
= $(SHARED_GLAPI_OUTPUT_DIR
)/glapi_mapi_tmp.h
32 all: es1 es2 shared-glapi
36 shared-glapi
: $(SHARED_GLAPI_OUTPUTS
)
38 $(ES1_OUTPUTS
): APIXML
:= $(ES1_APIXML
)
39 $(ES1_OUTPUTS
): PRINTER
:= es1api
40 $(ES1_OUTPUTS
): $(ES1_DEPS
)
42 $(ES2_OUTPUTS
): APIXML
:= $(ES2_APIXML
)
43 $(ES2_OUTPUTS
): PRINTER
:= es2api
44 $(ES2_OUTPUTS
): $(ES2_DEPS
)
46 $(SHARED_GLAPI_OUTPUTS
): APIXML
:= $(SHARED_GLAPI_APIXML
)
47 $(SHARED_GLAPI_OUTPUTS
): PRINTER
:= shared-glapi
48 $(SHARED_GLAPI_OUTPUTS
): $(SHARED_GLAPI_DEPS
)
52 $(PYTHON2
) $(PYTHON_FLAGS
) $< -f
$(APIXML
) $(1) > $@
55 %/glapi_mapi_tmp.h
: $(MAPI
)/mapi_abi.py
$(COMMON
)
57 $(PYTHON2
) $(PYTHON_FLAGS
) $< \
58 --printer
$(PRINTER
) --mode lib
$(GLAPI
)/gl_and_es_API.xml
> $@
60 %/main
/dispatch.h
: $(GLAPI
)/gl_table.py
$(COMMON
)
61 $(call gen-glapi
,-c
-m remap_table
)
63 %/main
/remap_helper.h
: $(GLAPI
)/remap_helper.py
$(COMMON
)
67 @if
[ ! -f gl.h
]; then \
68 echo
"Please copy gl.h and gl2.h to this directory"; \
71 @echo
"Verifying that es1_API.xml covers OpenGL ES 1.1..."
72 @
$(PYTHON2
) $(PYTHON_FLAGS
) gl_parse_header.py gl.h
> tmp.xml
73 @
$(PYTHON2
) $(PYTHON_FLAGS
) gl_compare.py difference tmp.xml es1_API.xml
74 @echo
"Verifying that es2_API.xml covers OpenGL ES 2.0..."
75 @
$(PYTHON2
) $(PYTHON_FLAGS
) gl_parse_header.py gl2.h
> tmp.xml
76 @
$(PYTHON2
) $(PYTHON_FLAGS
) gl_compare.py difference tmp.xml es2_API.xml
81 -rm -rf
$(ES1_OUTPUT_DIR
)/main
85 -rm -rf
$(ES2_OUTPUT_DIR
)/main
88 -rm -f
$(SHARED_GLAPI_OUTPUTS
)
90 clean: clean-es1 clean-es2 clean-shared-glapi