X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmesa%2FAndroid.gen.mk;h=ee2d1dec2c7a57763b8fd575360e4df3530b779d;hb=293b3e0a3f73ef85b446259dc9422932e0b8ff49;hp=2ea8cc433de58b326777c481d7e2796ba08ee486;hpb=d5c1801a018efda8ac2bab6e0a21f3c3acc4b334;p=mesa.git diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk index 2ea8cc433de..ee2d1dec2c7 100644 --- a/src/mesa/Android.gen.mk +++ b/src/mesa/Android.gen.mk @@ -27,14 +27,21 @@ ifeq ($(LOCAL_MODULE_CLASS),) LOCAL_MODULE_CLASS := STATIC_LIBRARIES endif -intermediates := $(call local-intermediates-dir) -mydir := $(call my-dir) +intermediates := $(call local-generated-sources-dir) +# This is the list of auto-generated files: sources and headers sources := \ - main/api_exec_es1_dispatch.h \ - main/api_exec_es1_remap_helper.h \ - main/api_exec_es2_dispatch.h \ - main/api_exec_es2_remap_helper.h + main/enums.c \ + main/api_exec.c \ + main/dispatch.h \ + main/format_fallback.c \ + main/format_pack.c \ + main/format_unpack.c \ + main/format_info.h \ + main/remap_helper.h \ + main/get_hash.h \ + main/marshal_generated.c \ + main/marshal_generated.h LOCAL_SRC_FILES := $(filter-out $(sources), $(LOCAL_SRC_FILES)) @@ -47,21 +54,13 @@ LOCAL_C_INCLUDES += $(intermediates)/x86 endif endif -sources += main/git_sha1.h - sources := $(addprefix $(intermediates)/, $(sources)) LOCAL_GENERATED_SOURCES += $(sources) glapi := $(MESA_TOP)/src/mapi/glapi/gen -es_src_deps := \ - $(LOCAL_PATH)/main/APIspec.xml \ - $(LOCAL_PATH)/main/es_generator.py \ - $(LOCAL_PATH)/main/APIspecutil.py \ - $(LOCAL_PATH)/main/APIspec.py - -es_hdr_deps := \ +dispatch_deps := \ $(wildcard $(glapi)/*.py) \ $(wildcard $(glapi)/*.xml) @@ -71,41 +70,6 @@ define es-gen $(hide) $(PRIVATE_SCRIPT) $(1) $(PRIVATE_XML) > $@ endef -define generate-local - @echo "generate local sources" - $(hide) $(MESA_PYTHON2) $(glapi)/gl_enums.py -f $(glapi)/gl_and_es_API.xml > $(mydir)/main/enums.c - $(hide) $(MESA_PYTHON2) $(glapi)/gl_table.py -m remap_table -f $(glapi)/gl_and_es_API.xml > $(mydir)/main/dispatch.h - $(hide) $(MESA_PYTHON2) $(glapi)/remap_helper.py -f $(glapi)/gl_API.xml > $(mydir)/main/remap_helper.h - $(hide) $(MESA_PYTHON2) $(mydir)/main/es_generator.py -V GLES1.1 -S $(mydir)/main/APIspec.xml > $(mydir)/main/api_exec_es1.c - $(hide) $(MESA_PYTHON2) $(mydir)/main/es_generator.py -V GLES2.0 -S $(mydir)/main/APIspec.xml > $(mydir)/main/api_exec_es2.c - - @echo "Mesa Lex : $(PRIVATE_MODULE)" - $(hide) $(LEX) -o $(mydir)/program/lex.yy.c $(mydir)/program/program_lexer.l - @echo "Mesa Yacc: $(PRIVATE_MODULE)" - $(hide) $(YACC) -d -o $(mydir)/program/program_parse.tab.c $(mydir)/program/program_parse.y -endef - -$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_table.py -$(intermediates)/main/api_exec_%_dispatch.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml -$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/remap_helper.py -$(intermediates)/main/api_exec_%_remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml - -$(intermediates)/main/api_exec_%_dispatch.h: $(es_hdr_deps) - $(call es-gen, -c $* -m remap_table) - -$(intermediates)/main/api_exec_%_remap_helper.h: $(es_hdr_deps) - $(call es-gen, -c $*) - -$(intermediates)/main/git_sha1.h: - @mkdir -p $(dir $@) - @echo "GIT-SHA1: $(PRIVATE_MODULE) <= git" - $(hide) touch $@ - $(hide) if which git > /dev/null; then \ - git --git-dir $(PRIVATE_PATH)/../../.git log -n 1 --oneline | \ - sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ - > $@; \ - fi - matypes_deps := \ $(BUILD_OUT_EXECUTABLES)/mesa_gen_matypes$(BUILD_EXECUTABLE_SUFFIX) \ $(LOCAL_PATH)/main/mtypes.h \ @@ -115,4 +79,91 @@ $(intermediates)/x86/matypes.h: $(matypes_deps) @mkdir -p $(dir $@) @echo "MATYPES: $(PRIVATE_MODULE) <= $(notdir $@)" $(hide) $< > $@ - $(call generate-local) + +$(intermediates)/main/dispatch.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_table.py +$(intermediates)/main/dispatch.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml + +$(intermediates)/main/dispatch.h: $(dispatch_deps) + $(call es-gen, $* -m remap_table) + +$(intermediates)/main/remap_helper.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/remap_helper.py +$(intermediates)/main/remap_helper.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml + +$(intermediates)/main/remap_helper.h: $(dispatch_deps) + $(call es-gen, $*) + +$(intermediates)/main/enums.c: PRIVATE_SCRIPT :=$(MESA_PYTHON2) $(glapi)/gl_enums.py +$(intermediates)/main/enums.c: PRIVATE_XML := -f $(glapi)/../registry/gl.xml + +$(intermediates)/main/enums.c: $(dispatch_deps) + $(call es-gen) + +$(intermediates)/main/api_exec.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_genexec.py +$(intermediates)/main/api_exec.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml + +$(intermediates)/main/api_exec.c: $(dispatch_deps) + $(call es-gen) + +$(intermediates)/main/marshal_generated.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal.py +$(intermediates)/main/marshal_generated.c: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml + +$(intermediates)/main/marshal_generated.c: $(dispatch_deps) + $(call es-gen) + +$(intermediates)/main/marshal_generated.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(glapi)/gl_marshal_h.py +$(intermediates)/main/marshal_generated.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml + +$(intermediates)/main/marshal_generated.h: $(dispatch_deps) + $(call es-gen) + +GET_HASH_GEN := $(LOCAL_PATH)/main/get_hash_generator.py + +$(intermediates)/main/get_hash.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(GET_HASH_GEN) +$(intermediates)/main/get_hash.h: PRIVATE_XML := -f $(glapi)/gl_and_es_API.xml +$(intermediates)/main/get_hash.h: $(glapi)/gl_and_es_API.xml \ + $(LOCAL_PATH)/main/get_hash_params.py $(GET_HASH_GEN) + $(call es-gen) + +FORMAT_FALLBACK := $(LOCAL_PATH)/main/format_fallback.py +format_fallback_deps := \ + $(LOCAL_PATH)/main/formats.csv \ + $(LOCAL_PATH)/main/format_parser.py \ + $(FORMAT_FALLBACK) + +$(intermediates)/main/format_fallback.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_FALLBACK) +$(intermediates)/main/format_fallback.c: PRIVATE_XML := +$(intermediates)/main/format_fallback.c: $(format_fallback_deps) + $(call es-gen, $< /dev/stdout) + +FORMAT_INFO := $(LOCAL_PATH)/main/format_info.py +format_info_deps := \ + $(LOCAL_PATH)/main/formats.csv \ + $(LOCAL_PATH)/main/format_parser.py \ + $(FORMAT_INFO) + +$(intermediates)/main/format_info.h: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_INFO) +$(intermediates)/main/format_info.h: PRIVATE_XML := +$(intermediates)/main/format_info.h: $(format_info_deps) + $(call es-gen, $<) + +FORMAT_PACK := $(LOCAL_PATH)/main/format_pack.py +format_pack_deps := \ + $(LOCAL_PATH)/main/formats.csv \ + $(LOCAL_PATH)/main/format_parser.py \ + $(FORMAT_PACK) + +$(intermediates)/main/format_pack.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_PACK) +$(intermediates)/main/format_pack.c: PRIVATE_XML := +$(intermediates)/main/format_pack.c: $(format_pack_deps) + $(call es-gen, $<) + +FORMAT_UNPACK := $(LOCAL_PATH)/main/format_unpack.py +format_unpack_deps := \ + $(LOCAL_PATH)/main/formats.csv \ + $(LOCAL_PATH)/main/format_parser.py \ + $(FORMAT_UNPACK) + +$(intermediates)/main/format_unpack.c: PRIVATE_SCRIPT := $(MESA_PYTHON2) $(FORMAT_UNPACK) +$(intermediates)/main/format_unpack.c: PRIVATE_XML := +$(intermediates)/main/format_unpack.c: $(format_unpack_deps) + $(call es-gen, $<)