1 # Mesa 3-D graphics library
3 # Copyright (C) 2010-2011 Chia-I Wu <olvaffe@gmail.com>
4 # Copyright (C) 2010-2011 LunarG Inc.
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:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
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.
24 # included by core mesa Android.mk for source generation
26 ifeq ($(LOCAL_MODULE_CLASS
),)
27 LOCAL_MODULE_CLASS
:= STATIC_LIBRARIES
30 intermediates
:= $(call local-generated-sources-dir
)
32 # This is the list of auto-generated files: sources and headers
38 main
/format_unpack.c \
42 main
/marshal_generated.c \
43 main
/marshal_generated.h
45 LOCAL_SRC_FILES
:= $(filter-out $(sources
), $(LOCAL_SRC_FILES
))
47 LOCAL_C_INCLUDES
+= $(intermediates
)/main
49 ifeq ($(strip $(MESA_ENABLE_ASM
)),true
)
50 ifeq ($(TARGET_ARCH
),x86
)
51 sources
+= x86
/matypes.h
52 LOCAL_C_INCLUDES
+= $(intermediates
)/x86
56 sources
+= main
/git_sha1.h
58 sources
:= $(addprefix $(intermediates
)/, $(sources
))
60 LOCAL_GENERATED_SOURCES
+= $(sources
)
62 glapi
:= $(MESA_TOP
)/src
/mapi
/glapi
/gen
65 $(wildcard $(glapi
)/*.py
) \
66 $(wildcard $(glapi
)/*.xml
)
70 @echo
"Gen ES: $(PRIVATE_MODULE) <= $(notdir $(@))"
71 $(hide
) $(PRIVATE_SCRIPT
) $(1) $(PRIVATE_XML
) > $@
74 $(intermediates
)/main
/git_sha1.h
:
76 @echo
"GIT-SHA1: $(PRIVATE_MODULE) <= git"
78 $(hide
) if which git
> /dev
/null
; then \
79 git
--git-dir
$(PRIVATE_PATH
)/..
/..
/.git log
-n
1 --oneline | \
80 sed
's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \
85 $(BUILD_OUT_EXECUTABLES
)/mesa_gen_matypes
$(BUILD_EXECUTABLE_SUFFIX
) \
86 $(LOCAL_PATH
)/main
/mtypes.h \
87 $(LOCAL_PATH
)/tnl
/t_context.h
89 $(intermediates
)/x86
/matypes.h
: $(matypes_deps
)
91 @echo
"MATYPES: $(PRIVATE_MODULE) <= $(notdir $@)"
94 $(intermediates
)/main
/dispatch.h
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(glapi
)/gl_table.py
95 $(intermediates
)/main
/dispatch.h
: PRIVATE_XML
:= -f
$(glapi
)/gl_and_es_API.xml
97 $(intermediates
)/main
/dispatch.h
: $(dispatch_deps
)
98 $(call es-gen
, $* -m remap_table
)
100 $(intermediates
)/main
/remap_helper.h
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(glapi
)/remap_helper.py
101 $(intermediates
)/main
/remap_helper.h
: PRIVATE_XML
:= -f
$(glapi
)/gl_and_es_API.xml
103 $(intermediates
)/main
/remap_helper.h
: $(dispatch_deps
)
106 $(intermediates
)/main
/enums.c
: PRIVATE_SCRIPT
:=$(MESA_PYTHON2
) $(glapi
)/gl_enums.py
107 $(intermediates
)/main
/enums.c
: PRIVATE_XML
:= -f
$(glapi
)/..
/registry
/gl.xml
109 $(intermediates
)/main
/enums.c
: $(dispatch_deps
)
112 $(intermediates
)/main
/api_exec.c
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(glapi
)/gl_genexec.py
113 $(intermediates
)/main
/api_exec.c
: PRIVATE_XML
:= -f
$(glapi
)/gl_and_es_API.xml
115 $(intermediates
)/main
/api_exec.c
: $(dispatch_deps
)
118 $(intermediates
)/main
/marshal_generated.c
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(glapi
)/gl_marshal.py
119 $(intermediates
)/main
/marshal_generated.c
: PRIVATE_XML
:= -f
$(glapi
)/gl_and_es_API.xml
121 $(intermediates
)/main
/marshal_generated.c
: $(dispatch_deps
)
124 $(intermediates
)/main
/marshal_generated.h
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(glapi
)/gl_marshal_h.py
125 $(intermediates
)/main
/marshal_generated.h
: PRIVATE_XML
:= -f
$(glapi
)/gl_and_es_API.xml
127 $(intermediates
)/main
/marshal_generated.h
: $(dispatch_deps
)
130 GET_HASH_GEN
:= $(LOCAL_PATH
)/main
/get_hash_generator.py
132 $(intermediates
)/main
/get_hash.h
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(GET_HASH_GEN
)
133 $(intermediates
)/main
/get_hash.h
: PRIVATE_XML
:= -f
$(glapi
)/gl_and_es_API.xml
134 $(intermediates
)/main
/get_hash.h
: $(glapi
)/gl_and_es_API.xml \
135 $(LOCAL_PATH
)/main
/get_hash_params.py
$(GET_HASH_GEN
)
138 FORMAT_INFO
:= $(LOCAL_PATH
)/main
/format_info.py
139 format_info_deps
:= \
140 $(LOCAL_PATH
)/main
/formats.csv \
141 $(LOCAL_PATH
)/main
/format_parser.py \
144 $(intermediates
)/main
/format_info.h
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(FORMAT_INFO
)
145 $(intermediates
)/main
/format_info.h
: PRIVATE_XML
:=
146 $(intermediates
)/main
/format_info.h
: $(format_info_deps
)
149 FORMAT_PACK
:= $(LOCAL_PATH
)/main
/format_pack.py
150 format_pack_deps
:= \
151 $(LOCAL_PATH
)/main
/formats.csv \
152 $(LOCAL_PATH
)/main
/format_parser.py \
155 $(intermediates
)/main
/format_pack.c
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(FORMAT_PACK
)
156 $(intermediates
)/main
/format_pack.c
: PRIVATE_XML
:=
157 $(intermediates
)/main
/format_pack.c
: $(format_pack_deps
)
160 FORMAT_UNPACK
:= $(LOCAL_PATH
)/main
/format_unpack.py
161 format_unpack_deps
:= \
162 $(LOCAL_PATH
)/main
/formats.csv \
163 $(LOCAL_PATH
)/main
/format_parser.py \
166 $(intermediates
)/main
/format_unpack.c
: PRIVATE_SCRIPT
:= $(MESA_PYTHON2
) $(FORMAT_UNPACK
)
167 $(intermediates
)/main
/format_unpack.c
: PRIVATE_XML
:=
168 $(intermediates
)/main
/format_unpack.c
: $(format_unpack_deps
)