- ../common/libdricommon.la \
- $(DRI_LIB_DEPS) \
- $(INTEL_LIBS)
-
-TEST_LIBS = \
- $(COMMON_LIBS) \
- -lrt \
- ../common/libdri_test_stubs.la
-
-i965_dri_la_SOURCES =
-i965_dri_la_LIBADD = $(COMMON_LIBS)
-i965_dri_la_LDFLAGS = -module -avoid-version -shared
-
-TESTS = \
- test_eu_compact \
- test_vec4_register_coalesce
-check_PROGRAMS = $(TESTS)
-
-test_vec4_register_coalesce_SOURCES = \
- test_vec4_register_coalesce.cpp
-test_vec4_register_coalesce_LDADD = \
- $(TEST_LIBS) \
- $(top_builddir)/src/gtest/libgtest.la
-
-test_eu_compact_SOURCES = \
- test_eu_compact.c
-nodist_EXTRA_test_eu_compact_SOURCES = dummy.cpp
-test_eu_compact_LDADD = $(TEST_LIBS)
-
-# Provide compatibility with scripts for the old Mesa build system for
-# a while by putting a link to the driver into /lib of the build tree.
-all-local: i965_dri.la
- $(MKDIR_P) $(top_builddir)/$(LIB_DIR);
- ln -f .libs/i965_dri.so $(top_builddir)/$(LIB_DIR)/i965_dri.so;
-
-endif
+ $(I965_PERGEN_LIBS)
+
+libi965_dri_la_SOURCES = \
+ $(i965_FILES) \
+ $(i965_oa_GENERATED_FILES)
+libi965_dri_la_LIBADD = \
+ $(top_builddir)/src/intel/common/libintel_common.la \
+ $(top_builddir)/src/intel/isl/libisl.la \
+ $(top_builddir)/src/intel/compiler/libintel_compiler.la \
+ $(top_builddir)/src/intel/blorp/libblorp.la \
+ $(I965_PERGEN_LIBS) \
+ $(LIBDRM_LIBS)
+
+BUILT_SOURCES = $(i965_oa_GENERATED_FILES)
+CLEANFILES = $(BUILT_SOURCES)
+
+EXTRA_DIST = \
+ brw_oa_hsw.xml \
+ brw_oa_bdw.xml \
+ brw_oa_chv.xml \
+ brw_oa_sklgt2.xml \
+ brw_oa_sklgt3.xml \
+ brw_oa_sklgt4.xml \
+ brw_oa_bxt.xml \
+ brw_oa_kblgt2.xml \
+ brw_oa_kblgt3.xml \
+ brw_oa_glk.xml \
+ brw_oa.py
+
+# Note: we avoid using a multi target rule here and outputting both the
+# .c and .h files in one go so we don't hit problems with parallel
+# make and multiple invocations of the same script trying to write
+# to the same files.
+brw_oa_%.h: brw_oa.py brw_oa_%.xml Makefile.am
+ $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py --header=$(builddir)/brw_oa_$(*).h --chipset=$(*) $(srcdir)/brw_oa_$(*).xml
+brw_oa_%.c: brw_oa.py brw_oa_%.xml Makefile.am
+ $(PYTHON2) $(PYTHON_FLAGS) $(srcdir)/brw_oa.py --code=$(builddir)/brw_oa_$(*).c --chipset=$(*) $(srcdir)/brw_oa_$(*).xml