summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-22 14:10:46 -0700
committerJason Ekstrand <[email protected]>2016-08-25 15:29:48 -0700
commitbebc1a1d995e33f173ea207848bcddd81f6dd19a (patch)
treecae7542194008f8f78845a2a495bb39d3add3b39
parentc19fc5e0198cbc1eead3db9672d51c56c1aa3f1d (diff)
intel: Flatten the makefile structure
This pulls isl and genxml into a single make file so that they can properly build in parallel. This isn't terribly important now as genxml just generates sources which happens serially first anyway but it will be more important as we add more stuff to src/intel. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--configure.ac2
-rw-r--r--src/intel/Makefile.am37
-rw-r--r--src/intel/Makefile.genxml.am (renamed from src/intel/genxml/Makefile.am)41
-rw-r--r--src/intel/Makefile.isl.am84
-rw-r--r--src/intel/Makefile.sources50
-rw-r--r--src/intel/genxml/Makefile.sources9
-rw-r--r--src/intel/isl/Makefile.am108
-rw-r--r--src/intel/isl/Makefile.sources40
-rw-r--r--src/intel/isl/gen_format_layout.py2
9 files changed, 189 insertions, 184 deletions
diff --git a/configure.ac b/configure.ac
index 6da7b382ff3..75b1de4da95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2746,8 +2746,6 @@ AC_CONFIG_FILES([Makefile
src/glx/tests/Makefile
src/gtest/Makefile
src/intel/Makefile
- src/intel/genxml/Makefile
- src/intel/isl/Makefile
src/intel/tools/Makefile
src/intel/vulkan/Makefile
src/loader/Makefile
diff --git a/src/intel/Makefile.am b/src/intel/Makefile.am
index 520602dd290..3b7d2f3a85b 100644
--- a/src/intel/Makefile.am
+++ b/src/intel/Makefile.am
@@ -19,4 +19,39 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-SUBDIRS = genxml isl
+include Makefile.sources
+
+# The gallium includes are for the util/u_math.h include from main/macros.h
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/src \
+ -I$(top_srcdir)/src \
+ -I$(top_builddir)/src/intel \
+ -I$(top_srcdir)/src/intel \
+ -I$(top_srcdir)/src/mapi \
+ -I$(top_srcdir)/src/mesa \
+ -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
+ -I$(top_srcdir)/src/gallium/auxiliary \
+ -I$(top_srcdir)/src/gallium/include \
+ $(INTEL_CFLAGS) \
+ $(VALGRIND_CFLAGS) \
+ $(DEFINES)
+
+AM_CFLAGS = \
+ $(VISIBILITY_CFLAGS) \
+ -Wno-override-init
+
+MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
+
+noinst_LTLIBRARIES =
+check_PROGRAMS =
+TESTS =
+BUILT_SOURCES =
+CLEANFILES =
+EXTRA_DIST =
+
+include Makefile.genxml.am
+include Makefile.isl.am
+
+CLEANFILES += $(BUILT_SOURCES)
diff --git a/src/intel/genxml/Makefile.am b/src/intel/Makefile.genxml.am
index 95c1ff9a508..f80e2fd3bb8 100644
--- a/src/intel/genxml/Makefile.am
+++ b/src/intel/Makefile.genxml.am
@@ -19,31 +19,26 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-include Makefile.sources
-
-BUILT_SOURCES = $(GENXML_GENERATED_FILES)
-
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
+BUILT_SOURCES += $(GENXML_GENERATED_FILES)
SUFFIXES = _pack.h .xml
-$(BUILT_SOURCES): gen_pack_header.py
+$(GENXML_GENERATED_FILES): genxml/gen_pack_header.py
.xml_pack.h:
- $(PYTHON_GEN) $(srcdir)/gen_pack_header.py $< > $@
-
-CLEANFILES = $(BUILT_SOURCES)
-
-EXTRA_DIST = \
- gen4.xml \
- gen45.xml \
- gen5.xml \
- gen6.xml \
- gen7.xml \
- gen75.xml \
- gen8.xml \
- gen9.xml \
- genX_pack.h \
- gen_macros.h \
- gen_pack_header.py \
- README
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/genxml/gen_pack_header.py $< > $@
+
+EXTRA_DIST += \
+ genxml/gen4.xml \
+ genxml/gen45.xml \
+ genxml/gen5.xml \
+ genxml/gen6.xml \
+ genxml/gen7.xml \
+ genxml/gen75.xml \
+ genxml/gen8.xml \
+ genxml/gen9.xml \
+ genxml/genX_pack.h \
+ genxml/gen_macros.h \
+ genxml/gen_pack_header.py \
+ genxml/README
diff --git a/src/intel/Makefile.isl.am b/src/intel/Makefile.isl.am
new file mode 100644
index 00000000000..88716846cec
--- /dev/null
+++ b/src/intel/Makefile.isl.am
@@ -0,0 +1,84 @@
+# Copyright 2015-2016 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+ISL_GEN_LIBS = \
+ isl/libisl-gen4.la \
+ isl/libisl-gen5.la \
+ isl/libisl-gen6.la \
+ isl/libisl-gen7.la \
+ isl/libisl-gen75.la \
+ isl/libisl-gen8.la \
+ isl/libisl-gen9.la \
+ $(NULL)
+
+noinst_LTLIBRARIES += $(ISL_GEN_LIBS) isl/libisl.la
+
+isl_libisl_la_LIBADD = $(ISL_GEN_LIBS)
+isl_libisl_la_SOURCES = $(ISL_FILES) $(ISL_GENERATED_FILES)
+
+isl_libisl_gen4_la_SOURCES = $(ISL_GEN4_FILES)
+isl_libisl_gen4_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=40
+
+isl_libisl_gen5_la_SOURCES = $(ISL_GEN5_FILES)
+isl_libisl_gen5_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=50
+
+isl_libisl_gen6_la_SOURCES = $(ISL_GEN6_FILES)
+isl_libisl_gen6_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=60
+
+isl_libisl_gen7_la_SOURCES = $(ISL_GEN7_FILES)
+isl_libisl_gen7_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=70
+
+isl_libisl_gen75_la_SOURCES = $(ISL_GEN75_FILES)
+isl_libisl_gen75_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=75
+
+isl_libisl_gen8_la_SOURCES = $(ISL_GEN8_FILES)
+isl_libisl_gen8_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=80
+
+isl_libisl_gen9_la_SOURCES = $(ISL_GEN9_FILES)
+isl_libisl_gen9_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=90
+
+BUILT_SOURCES += $(ISL_GENERATED_FILES)
+
+isl/isl_format_layout.c: isl/gen_format_layout.py \
+ isl/isl_format_layout.csv
+ $(MKDIR_GEN)
+ $(PYTHON_GEN) $(srcdir)/isl/gen_format_layout.py \
+ --csv $(srcdir)/isl/isl_format_layout.csv --out $@
+
+# ----------------------------------------------------------------------------
+# Tests
+# ----------------------------------------------------------------------------
+
+check_PROGRAMS += isl/tests/isl_surf_get_image_offset_test
+
+TESTS += $(check_PROGRAMS)
+
+isl_tests_isl_surf_get_image_offset_test_LDADD = \
+ isl/libisl.la \
+ $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
+ -lm
+
+# ----------------------------------------------------------------------------
+
+EXTRA_DIST += \
+ isl/gen_format_layout.py \
+ isl/isl_format_layout.csv \
+ isl/README
diff --git a/src/intel/Makefile.sources b/src/intel/Makefile.sources
new file mode 100644
index 00000000000..a8ba0b9a170
--- /dev/null
+++ b/src/intel/Makefile.sources
@@ -0,0 +1,50 @@
+GENXML_GENERATED_FILES = \
+ genxml/gen4_pack.h \
+ genxml/gen45_pack.h \
+ genxml/gen5_pack.h \
+ genxml/gen6_pack.h \
+ genxml/gen7_pack.h \
+ genxml/gen75_pack.h \
+ genxml/gen8_pack.h \
+ genxml/gen9_pack.h
+
+ISL_FILES = \
+ isl/isl.c \
+ isl/isl.h \
+ isl/isl_format.c \
+ isl/isl_priv.h \
+ isl/isl_storage_image.c
+
+ISL_GEN4_FILES = \
+ isl/isl_gen4.c \
+ isl/isl_gen4.h \
+ isl/isl_surface_state.c
+
+ISL_GEN5_FILES = \
+ isl/isl_surface_state.c
+
+ISL_GEN6_FILES = \
+ isl/isl_gen6.c \
+ isl/isl_gen6.h \
+ isl/isl_surface_state.c
+
+ISL_GEN7_FILES = \
+ isl/isl_gen7.c \
+ isl/isl_gen7.h \
+ isl/isl_surface_state.c
+
+ISL_GEN75_FILES = \
+ isl/isl_surface_state.c
+
+ISL_GEN8_FILES = \
+ isl/isl_gen8.c \
+ isl/isl_gen8.h \
+ isl/isl_surface_state.c
+
+ISL_GEN9_FILES = \
+ isl/isl_gen9.c \
+ isl/isl_gen9.h \
+ isl/isl_surface_state.c
+
+ISL_GENERATED_FILES = \
+ isl/isl_format_layout.c
diff --git a/src/intel/genxml/Makefile.sources b/src/intel/genxml/Makefile.sources
deleted file mode 100644
index 86c0bbe2bc0..00000000000
--- a/src/intel/genxml/Makefile.sources
+++ /dev/null
@@ -1,9 +0,0 @@
-GENXML_GENERATED_FILES = \
- gen4_pack.h \
- gen45_pack.h \
- gen5_pack.h \
- gen6_pack.h \
- gen7_pack.h \
- gen75_pack.h \
- gen8_pack.h \
- gen9_pack.h
diff --git a/src/intel/isl/Makefile.am b/src/intel/isl/Makefile.am
deleted file mode 100644
index c3426102473..00000000000
--- a/src/intel/isl/Makefile.am
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 2015-2016 Intel Corporation
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-include Makefile.sources
-
-ISL_GEN_LIBS = \
- libisl-gen4.la \
- libisl-gen5.la \
- libisl-gen6.la \
- libisl-gen7.la \
- libisl-gen75.la \
- libisl-gen8.la \
- libisl-gen9.la \
- $(NULL)
-
-noinst_LTLIBRARIES = $(ISL_GEN_LIBS) libisl.la
-
-# The gallium includes are for the util/u_math.h include from main/macros.h
-AM_CPPFLAGS = \
- $(INTEL_CFLAGS) \
- $(VALGRIND_CFLAGS) \
- $(DEFINES) \
- -I$(top_srcdir)/include \
- -I$(top_builddir)/src \
- -I$(top_srcdir)/src \
- -I$(top_builddir)/src/intel \
- -I$(top_srcdir)/src/intel \
- -I$(top_srcdir)/src/mapi \
- -I$(top_srcdir)/src/mesa \
- -I$(top_srcdir)/src/mesa/drivers/dri/i965 \
- -I$(top_srcdir)/src/gallium/auxiliary \
- -I$(top_srcdir)/src/gallium/include
-
-AM_CFLAGS = \
- $(VISIBILITY_CFLAGS) \
- -Wno-override-init
-
-libisl_la_LIBADD = $(ISL_GEN_LIBS)
-
-libisl_la_SOURCES = $(ISL_FILES) $(ISL_GENERATED_FILES)
-
-libisl_gen4_la_SOURCES = $(ISL_GEN4_FILES)
-libisl_gen4_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=40
-
-libisl_gen5_la_SOURCES = $(ISL_GEN5_FILES)
-libisl_gen5_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=50
-
-libisl_gen6_la_SOURCES = $(ISL_GEN6_FILES)
-libisl_gen6_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=60
-
-libisl_gen7_la_SOURCES = $(ISL_GEN7_FILES)
-libisl_gen7_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=70
-
-libisl_gen75_la_SOURCES = $(ISL_GEN75_FILES)
-libisl_gen75_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=75
-
-libisl_gen8_la_SOURCES = $(ISL_GEN8_FILES)
-libisl_gen8_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=80
-
-libisl_gen9_la_SOURCES = $(ISL_GEN9_FILES)
-libisl_gen9_la_CFLAGS = $(AM_CFLAGS) -DGEN_VERSIONx10=90
-
-BUILT_SOURCES = $(ISL_GENERATED_FILES)
-
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
-
-isl_format_layout.c: gen_format_layout.py \
- isl_format_layout.csv
- $(PYTHON_GEN) $(srcdir)/gen_format_layout.py \
- --csv $(srcdir)/isl_format_layout.csv --out $@
-
-# ----------------------------------------------------------------------------
-# Tests
-# ----------------------------------------------------------------------------
-
-check_PROGRAMS = tests/isl_surf_get_image_offset_test
-
-TESTS = $(check_PROGRAMS)
-
-tests_isl_surf_get_image_offset_test_LDADD = \
- libisl.la \
- $(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
- -lm
-
-# ----------------------------------------------------------------------------
-
-EXTRA_DIST = \
- gen_format_layout.py \
- isl_format_layout.csv \
- README
diff --git a/src/intel/isl/Makefile.sources b/src/intel/isl/Makefile.sources
deleted file mode 100644
index aa20ed4cb09..00000000000
--- a/src/intel/isl/Makefile.sources
+++ /dev/null
@@ -1,40 +0,0 @@
-ISL_FILES = \
- isl.c \
- isl.h \
- isl_format.c \
- isl_priv.h \
- isl_storage_image.c
-
-ISL_GEN4_FILES = \
- isl_gen4.c \
- isl_gen4.h \
- isl_surface_state.c
-
-ISL_GEN5_FILES = \
- isl_surface_state.c
-
-ISL_GEN6_FILES = \
- isl_gen6.c \
- isl_gen6.h \
- isl_surface_state.c
-
-ISL_GEN7_FILES = \
- isl_gen7.c \
- isl_gen7.h \
- isl_surface_state.c
-
-ISL_GEN75_FILES = \
- isl_surface_state.c
-
-ISL_GEN8_FILES = \
- isl_gen8.c \
- isl_gen8.h \
- isl_surface_state.c
-
-ISL_GEN9_FILES = \
- isl_gen9.c \
- isl_gen9.h \
- isl_surface_state.c
-
-ISL_GENERATED_FILES = \
- isl_format_layout.c
diff --git a/src/intel/isl/gen_format_layout.py b/src/intel/isl/gen_format_layout.py
index c9163fed194..f52e4549975 100644
--- a/src/intel/isl/gen_format_layout.py
+++ b/src/intel/isl/gen_format_layout.py
@@ -59,7 +59,7 @@ TEMPLATE = template.Template(
* IN THE SOFTWARE.
*/
- #include "isl.h"
+ #include "isl/isl.h"
const struct isl_format_layout
isl_format_layouts[] = {