android: radeonsi: add support for sid_tables.h generated sources
authorMauro Rossi <issor.oruam@gmail.com>
Sun, 6 Sep 2015 12:15:38 +0000 (14:15 +0200)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 9 Sep 2015 14:27:31 +0000 (15:27 +0100)
This patch is necessary to avoid building error on android,
due to missing sid_tables.h generated sources

v2:[Emil Velikov] Correctly split the lists.

Fixes: fbbebeae10f(radeonsi: inline si_cmd_context_control)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/drivers/radeonsi/Android.mk
src/gallium/drivers/radeonsi/Makefile.am
src/gallium/drivers/radeonsi/Makefile.sources

index 57f3bef36b081485bdfb172d6bace4e5521416fc..b469aca946e40e8fc90936dba862c07ef207557c 100644 (file)
@@ -23,7 +23,7 @@
 
 LOCAL_PATH := $(call my-dir)
 
-# get C_SOURCES
+# get C_SOURCES and GENERATED_SOURCES
 include $(LOCAL_PATH)/Makefile.sources
 
 include $(CLEAR_VARS)
@@ -33,5 +33,15 @@ LOCAL_SRC_FILES := $(C_SOURCES)
 LOCAL_SHARED_LIBRARIES := libdrm libdrm_radeon
 LOCAL_MODULE := libmesa_pipe_radeonsi
 
+# generate sources
+intermediates := $(call local-generated-sources-dir)
+LOCAL_GENERATED_SOURCES := $(addprefix $(intermediates)/, $(GENERATED_SOURCES))
+
+$(LOCAL_GENERATED_SOURCES): PRIVATE_PYTHON := $(MESA_PYTHON2)
+$(LOCAL_GENERATED_SOURCES): PRIVATE_CUSTOM_TOOL = $(PRIVATE_PYTHON) $^ > $@
+
+$(intermediates)/sid_tables.h:  $(intermediates)/%.h: $(LOCAL_PATH)/%.py $(LOCAL_PATH)/sid.h
+       $(transform-generated-source)
+
 include $(GALLIUM_COMMON_MK)
 include $(BUILD_STATIC_LIBRARY)
index ae5035a89372c698f96f0d76a1db91cb660066a9..c506666e3c870ae82dac4076f95d162b96a8388b 100644 (file)
@@ -30,7 +30,7 @@ AM_CFLAGS = \
 
 noinst_LTLIBRARIES = libradeonsi.la
 
-libradeonsi_la_SOURCES = $(C_SOURCES)
+libradeonsi_la_SOURCES = $(C_SOURCES) $(GENERATED_SOURCES)
 
 sid_tables.h: $(srcdir)/sid_tables.py $(srcdir)/sid.h
        $(AM_V_GEN) $(PYTHON2) $(srcdir)/sid_tables.py $(srcdir)/sid.h > $@
index 5f5eac12be0f012bb687b56ae5267bafeee74aa9..7e997c6d5269fb0cd171c45c0ba8fae8bccebf45 100644 (file)
@@ -6,7 +6,6 @@ C_SOURCES := \
        si_debug.c \
        si_descriptors.c \
        sid.h \
-       sid_tables.h \
        si_dma.c \
        si_hw_context.c \
        si_pipe.c \
@@ -21,3 +20,6 @@ C_SOURCES := \
        si_state_shaders.c \
        si_state.h \
        si_uvd.c
+
+GENERATED_SOURCES := \
+       sid_tables.h