Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / mesa / Android.gen.mk
1 # Mesa 3-D graphics library
2 #
3 # Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
4 # Copyright (C) 2010-2011 LunarG Inc.
5 #
6 # Permission is hereby granted, free of charge, to any person obtaining a
7 # copy of this software and associated documentation files (the "Software"),
8 # to deal in the Software without restriction, including without limitation
9 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 # and/or sell copies of the Software, and to permit persons to whom the
11 # Software is furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 # DEALINGS IN THE SOFTWARE.
23
24 # included by core mesa Android.mk for source generation
25
26 ifeq ($(LOCAL_MODULE_CLASS),)
27 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
28 endif
29
30 intermediates := $(call local-generated-sources-dir)
31
32 # This is the list of auto-generated files: sources and headers
33 sources := \
34 main/enums.c \
35 main/api_exec.c \
36 main/dispatch.h \
37 main/format_fallback.c \
38 main/format_pack.c \
39 main/format_unpack.c \
40 main/format_info.h \
41 main/remap_helper.h \
42 main/get_hash.h \
43 main/marshal_generated0.c \
44 main/marshal_generated1.c \
45 main/marshal_generated2.c \
46 main/marshal_generated3.c \
47 main/marshal_generated4.c \
48 main/marshal_generated5.c \
49 main/marshal_generated6.c \
50 main/marshal_generated7.c \
51 main/marshal_generated.h
52
53 LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES))
54
55 LOCAL_C_INCLUDES += $(intermediates)/main
56
57 sources := $(addprefix $(intermediates)/, $(sources))
58
59 LOCAL_GENERATED_SOURCES += $(sources)
60
61 glapi := $(MESA_TOP)/src/mapi/glapi/gen
62
63 dispatch_deps := \
64 $(wildcard $(glapi)/*.py) \
65 $(wildcard $(glapi)/*.xml)
66
67 define es-gen
68 @mkdir -p $(dir $@)
69 @echo "Gen ES: $(PRIVATE_MODULE) <= $(notdir $(@))"
70 $(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@
71 endef
72
73 $(intermediates)/main/dispatch.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_table.py
74 $(intermediates)/main/dispatch.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
75
76 $(intermediates)/main/dispatch.h: $(dispatch_deps)
77 $(call es-gen, $* -m remap_table)
78
79 $(intermediates)/main/remap_helper.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/remap_helper.py
80 $(intermediates)/main/remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
81
82 $(intermediates)/main/remap_helper.h: $(dispatch_deps)
83 $(call es-gen, $*)
84
85 $(intermediates)/main/enums.c: PRIVATE_SCRIPT :=$(MESA_PYTHON2) $(glapi)/gl_enums.py
86 $(intermediates)/main/enums.c: PRIVATE_XML := -f $(glapi)/../registry/gl.xml
87
88 $(intermediates)/main/enums.c: $(dispatch_deps)
89 $(call es-gen)
90
91 $(intermediates)/main/api_exec.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_genexec.py
92 $(intermediates)/main/api_exec.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
93
94 $(intermediates)/main/api_exec.c: $(dispatch_deps)
95 $(call es-gen)
96
97 $(intermediates)/main/marshal_generated0.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
98 $(intermediates)/main/marshal_generated0.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 0 -n 8
99
100 $(intermediates)/main/marshal_generated0.c: $(dispatch_deps)
101 $(call es-gen)
102
103 $(intermediates)/main/marshal_generated1.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
104 $(intermediates)/main/marshal_generated1.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 1 -n 8
105
106 $(intermediates)/main/marshal_generated1.c: $(dispatch_deps)
107 $(call es-gen)
108
109 $(intermediates)/main/marshal_generated2.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
110 $(intermediates)/main/marshal_generated2.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 2 -n 8
111
112 $(intermediates)/main/marshal_generated2.c: $(dispatch_deps)
113 $(call es-gen)
114
115 $(intermediates)/main/marshal_generated3.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
116 $(intermediates)/main/marshal_generated3.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 3 -n 8
117
118 $(intermediates)/main/marshal_generated3.c: $(dispatch_deps)
119 $(call es-gen)
120
121 $(intermediates)/main/marshal_generated4.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
122 $(intermediates)/main/marshal_generated4.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 4 -n 8
123
124 $(intermediates)/main/marshal_generated4.c: $(dispatch_deps)
125 $(call es-gen)
126
127 $(intermediates)/main/marshal_generated5.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
128 $(intermediates)/main/marshal_generated5.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 5 -n 8
129
130 $(intermediates)/main/marshal_generated5.c: $(dispatch_deps)
131 $(call es-gen)
132
133 $(intermediates)/main/marshal_generated6.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
134 $(intermediates)/main/marshal_generated6.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 6 -n 8
135
136 $(intermediates)/main/marshal_generated6.c: $(dispatch_deps)
137 $(call es-gen)
138
139 $(intermediates)/main/marshal_generated7.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py
140 $(intermediates)/main/marshal_generated7.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -i 7 -n 8
141
142 $(intermediates)/main/marshal_generated7.c: $(dispatch_deps)
143 $(call es-gen)
144
145 $(intermediates)/main/marshal_generated.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal_h.py
146 $(intermediates)/main/marshal_generated.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
147
148 $(intermediates)/main/marshal_generated.h: $(dispatch_deps)
149 $(call es-gen)
150
151 GET_HASH_GEN := $(LOCAL_PATH)/main/get_hash_generator.py
152
153 $(intermediates)/main/get_hash.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(GET_HASH_GEN)
154 $(intermediates)/main/get_hash.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml
155 $(intermediates)/main/get_hash.h: $(glapi)/gl_and_es_API.xml \
156 $(LOCAL_PATH)/main/get_hash_params.py $(GET_HASH_GEN)
157 $(call es-gen)
158
159 FORMAT_FALLBACK := $(LOCAL_PATH)/main/format_fallback.py
160 format_fallback_deps := \
161 $(LOCAL_PATH)/main/formats.csv \
162 $(LOCAL_PATH)/main/format_parser.py \
163 $(FORMAT_FALLBACK)
164
165 $(intermediates)/main/format_fallback.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_FALLBACK)
166 $(intermediates)/main/format_fallback.c: PRIVATE_XML :=
167 $(intermediates)/main/format_fallback.c: $(format_fallback_deps)
168 $(call es-gen, $< /dev/stdout)
169
170 FORMAT_INFO := $(LOCAL_PATH)/main/format_info.py
171 format_info_deps := \
172 $(LOCAL_PATH)/main/formats.csv \
173 $(LOCAL_PATH)/main/format_parser.py \
174 $(FORMAT_INFO)
175
176 $(intermediates)/main/format_info.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_INFO)
177 $(intermediates)/main/format_info.h: PRIVATE_XML :=
178 $(intermediates)/main/format_info.h: $(format_info_deps)
179 $(call es-gen, $<)
180
181 FORMAT_PACK := $(LOCAL_PATH)/main/format_pack.py
182 format_pack_deps := \
183 $(LOCAL_PATH)/main/formats.csv \
184 $(LOCAL_PATH)/main/format_parser.py \
185 $(FORMAT_PACK)
186
187 $(intermediates)/main/format_pack.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_PACK)
188 $(intermediates)/main/format_pack.c: PRIVATE_XML :=
189 $(intermediates)/main/format_pack.c: $(format_pack_deps)
190 $(call es-gen, $<)
191
192 FORMAT_UNPACK := $(LOCAL_PATH)/main/format_unpack.py
193 format_unpack_deps := \
194 $(LOCAL_PATH)/main/formats.csv \
195 $(LOCAL_PATH)/main/format_parser.py \
196 $(FORMAT_UNPACK)
197
198 $(intermediates)/main/format_unpack.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_UNPACK)
199 $(intermediates)/main/format_unpack.c: PRIVATE_XML :=
200 $(intermediates)/main/format_unpack.c: $(format_unpack_deps)
201 $(call es-gen, $<)