intel: Flatten the makefile structure
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 22 Aug 2016 21:10:46 +0000 (14:10 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 25 Aug 2016 22:29:48 +0000 (15:29 -0700)
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 <jason@jlekstrand.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
configure.ac
src/intel/Makefile.am
src/intel/Makefile.genxml.am [new file with mode: 0644]
src/intel/Makefile.isl.am [new file with mode: 0644]
src/intel/Makefile.sources [new file with mode: 0644]
src/intel/genxml/Makefile.am [deleted file]
src/intel/genxml/Makefile.sources [deleted file]
src/intel/isl/Makefile.am [deleted file]
src/intel/isl/Makefile.sources [deleted file]
src/intel/isl/gen_format_layout.py

index 6da7b382ff3676a2d60328f046fedcf52e994833..75b1de4da95019b7787dd6c1e506b009a5cd0be8 100644 (file)
@@ -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
index 520602dd290e647267744bbf993727d59b1f8c13..3b7d2f3a85b0382369d83eee02ab9acd82cdcfa4 100644 (file)
 # 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/Makefile.genxml.am b/src/intel/Makefile.genxml.am
new file mode 100644 (file)
index 0000000..f80e2fd
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright © 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.
+
+BUILT_SOURCES += $(GENXML_GENERATED_FILES)
+
+SUFFIXES = _pack.h .xml
+
+$(GENXML_GENERATED_FILES): genxml/gen_pack_header.py
+
+.xml_pack.h:
+       $(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 (file)
index 0000000..8871684
--- /dev/null
@@ -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 (file)
index 0000000..a8ba0b9
--- /dev/null
@@ -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.am b/src/intel/genxml/Makefile.am
deleted file mode 100644 (file)
index 95c1ff9..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright © 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
-
-BUILT_SOURCES = $(GENXML_GENERATED_FILES)
-
-PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
-
-SUFFIXES = _pack.h .xml
-
-$(BUILT_SOURCES): 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
diff --git a/src/intel/genxml/Makefile.sources b/src/intel/genxml/Makefile.sources
deleted file mode 100644 (file)
index 86c0bbe..0000000
+++ /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 (file)
index c342610..0000000
+++ /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 (file)
index aa20ed4..0000000
+++ /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
index c9163fed1949e855b63ebbe8c3a15cfbe1645e95..f52e45499750db439a1dc4b3bee88c65e4c466d2 100644 (file)
@@ -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[] = {