[Mesa-dev] [PATCH 3/3] gallium/vc4: rework the USE_VC4_SIMULATOR build

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 14 08:10:52 PDT 2014


 - Conditionally build and link libvc4_kernel.la
 - Move -lsimpenrose from SIM_LDFLAGS to SIM_LIB

Cc: Eric Anholt <eric at anholt.net>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/drivers/vc4/Makefile.am        | 16 +++++++++-------
 src/gallium/drivers/vc4/kernel/Makefile.am |  6 +-----
 src/gallium/drivers/vc4/kernel/vc4_gem.c   |  4 ----
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/src/gallium/drivers/vc4/Makefile.am b/src/gallium/drivers/vc4/Makefile.am
index 3fc591f..2dd0a00 100644
--- a/src/gallium/drivers/vc4/Makefile.am
+++ b/src/gallium/drivers/vc4/Makefile.am
@@ -19,16 +19,19 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
+if USE_VC4_SIMULATOR
 SUBDIRS = kernel
 
-include Makefile.sources
-include $(top_srcdir)/src/gallium/Automake.inc
-
-if USE_VC4_SIMULATOR
 SIM_CFLAGS = -DUSE_VC4_SIMULATOR=1
-SIM_LDFLAGS = -lsimpenrose
+SIM_LIB = \
+	kernel/libvc4_kernel.la \
+	-lsimpenrose
+
 endif
 
+include Makefile.sources
+include $(top_srcdir)/src/gallium/Automake.inc
+
 AM_CFLAGS = \
 	$(LIBDRM_CFLAGS) \
 	$(GALLIUM_DRIVER_CFLAGS) \
@@ -39,5 +42,4 @@ AM_CFLAGS = \
 noinst_LTLIBRARIES = libvc4.la
 
 libvc4_la_SOURCES = $(C_SOURCES)
-libvc4_la_LIBADD = $(SIM_LIB) kernel/libvc4_kernel.la
-libvc4_la_LDFLAGS = $(SIM_LDFLAGS)
+libvc4_la_LIBADD = $(SIM_LIB)
diff --git a/src/gallium/drivers/vc4/kernel/Makefile.am b/src/gallium/drivers/vc4/kernel/Makefile.am
index 1ae5f1c..0352485 100644
--- a/src/gallium/drivers/vc4/kernel/Makefile.am
+++ b/src/gallium/drivers/vc4/kernel/Makefile.am
@@ -22,16 +22,12 @@
 include Makefile.sources
 include $(top_srcdir)/src/gallium/Automake.inc
 
-if USE_VC4_SIMULATOR
-SIM_CFLAGS = -DUSE_VC4_SIMULATOR=1
-endif
-
 AM_CFLAGS = \
 	$(LIBDRM_CFLAGS) \
 	$(GALLIUM_DRIVER_CFLAGS) \
-	$(SIM_CFLAGS) \
 	-I$(top_srcdir)/src/mesa/ \
 	-I$(srcdir)/../ \
+	-DUSE_VC4_SIMULATOR=1 \
 	$()
 
 noinst_LTLIBRARIES = libvc4_kernel.la
diff --git a/src/gallium/drivers/vc4/kernel/vc4_gem.c b/src/gallium/drivers/vc4/kernel/vc4_gem.c
index 1ea17aa..720bfe5 100644
--- a/src/gallium/drivers/vc4/kernel/vc4_gem.c
+++ b/src/gallium/drivers/vc4/kernel/vc4_gem.c
@@ -21,8 +21,6 @@
  * IN THE SOFTWARE.
  */
 
-#ifdef USE_VC4_SIMULATOR
-
 #include "vc4_drv.h"
 
 int
@@ -143,5 +141,3 @@ fail:
 	kfree(temp);
 	return ret;
 }
-
-#endif /* USE_VC4_SIMULATOR */
-- 
2.1.0



More information about the mesa-dev mailing list