diff options
-rw-r--r-- | src/gallium/drivers/radeonsi/Android.mk | 12 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/Makefile.am | 2 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/Makefile.sources | 4 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/gallium/drivers/radeonsi/Android.mk b/src/gallium/drivers/radeonsi/Android.mk index 57f3bef36b0..b469aca946e 100644 --- a/src/gallium/drivers/radeonsi/Android.mk +++ b/src/gallium/drivers/radeonsi/Android.mk @@ -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) diff --git a/src/gallium/drivers/radeonsi/Makefile.am b/src/gallium/drivers/radeonsi/Makefile.am index ae5035a8937..c506666e3c8 100644 --- a/src/gallium/drivers/radeonsi/Makefile.am +++ b/src/gallium/drivers/radeonsi/Makefile.am @@ -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 > $@ diff --git a/src/gallium/drivers/radeonsi/Makefile.sources b/src/gallium/drivers/radeonsi/Makefile.sources index 5f5eac12be0..7e997c6d526 100644 --- a/src/gallium/drivers/radeonsi/Makefile.sources +++ b/src/gallium/drivers/radeonsi/Makefile.sources @@ -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 |