summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-08-30 12:55:29 -0400
committerAndreas Boll <[email protected]>2013-01-10 22:01:08 +0100
commit0dcb9ae0d9366b2ca9520c0c820cc466eb35bf67 (patch)
treeda9142dcbd68abc75296bc2c28e2f49bd700a34b /src/gallium
parent2cbb94b3ce012a2caf9e6ab10d69bf85d7222c27 (diff)
radeon/llvm: Convert to Automake
v2: Johannes Obermayr <[email protected]> Fix some undefined symbols. v3: Johannes Obermayr <[email protected]> Build it -shared to fix egl_gallium.so on r600/radeonsi builds.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r600/Makefile.am24
-rw-r--r--src/gallium/drivers/radeon/Makefile15
-rw-r--r--src/gallium/drivers/radeon/Makefile.am31
-rw-r--r--src/gallium/drivers/radeon/Makefile.sources4
-rw-r--r--src/gallium/drivers/radeonsi/Makefile.am13
5 files changed, 51 insertions, 36 deletions
diff --git a/src/gallium/drivers/r600/Makefile.am b/src/gallium/drivers/r600/Makefile.am
index 7af5748bddd..0fa1ffd960c 100644
--- a/src/gallium/drivers/r600/Makefile.am
+++ b/src/gallium/drivers/r600/Makefile.am
@@ -1,7 +1,7 @@
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
-noinst_LIBRARIES = libr600.a
+noinst_LTLIBRARIES = libr600.la
AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/drivers \
@@ -10,22 +10,20 @@ AM_CFLAGS = \
$(RADEON_CFLAGS) \
$(VISIBILITY_CFLAGS)
-libr600_a_SOURCES = \
+libr600_la_SOURCES = \
$(C_SOURCES)
if NEED_RADEON_GALLIUM
-# This is a hack until we can move the backend into the LLVM project.
-# We need to use mklib, because it splits up libradeon.a into object files
-# so that we can link it with the r600 objects.
-libr600_a_AR = $(top_srcdir)/bin/mklib -o r600 -static
-
-libr600_a_SOURCES += \
+libr600_la_SOURCES += \
$(LLVM_C_SOURCES) \
$(LLVM_CXX_SOURCES)
-libr600_a_LIBADD = \
- $(top_builddir)/src/gallium/drivers/radeon/libradeon.a
+libr600_la_LIBADD = ../radeon/libllvmradeon@[email protected]
+
+libr600_la_LDFLAGS = \
+ $(LLVM_LDFLAGS) \
+ $(shell $(LLVM_CONFIG) --libs asmparser bitreader ipo)
AM_CFLAGS += \
$(LLVM_CFLAGS) \
@@ -33,8 +31,6 @@ AM_CFLAGS += \
AM_CXXFLAGS= \
$(LLVM_CXXFLAGS)
-else
-libr600_a_AR = $(AR) $(ARFLAGS)
endif
if USE_R600_LLVM_COMPILER
@@ -46,3 +42,7 @@ if HAVE_GALLIUM_COMPUTE
AM_CFLAGS += \
-DHAVE_OPENCL
endif
+
+#XXX: Delete this when all r600 targets are converted to automake.
+all-local: libr600.la
+ ln -f $(builddir)/.libs/libr600.a $(builddir)/libr600.a
diff --git a/src/gallium/drivers/radeon/Makefile b/src/gallium/drivers/radeon/Makefile
deleted file mode 100644
index 7934c712195..00000000000
--- a/src/gallium/drivers/radeon/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-
-TOP = ../../../..
-include $(TOP)/configs/current
-
-include Makefile.sources
-
-LIBNAME = radeon
-
-LIBRARY_INCLUDES = -I$(TOP)/include
-
-CXXFLAGS+= $(LLVM_CXXFLAGS)
-
-include ../../Makefile.template
-
-CXXFLAGS := $(filter-out -DDEBUG, $(CXXFLAGS))
diff --git a/src/gallium/drivers/radeon/Makefile.am b/src/gallium/drivers/radeon/Makefile.am
new file mode 100644
index 00000000000..091adc4016d
--- /dev/null
+++ b/src/gallium/drivers/radeon/Makefile.am
@@ -0,0 +1,31 @@
+include Makefile.sources
+include $(top_srcdir)/src/gallium/Automake.inc
+
+if HAVE_GALLIUM_R600
+if HAVE_GALLIUM_RADEONSI
+lib_LTLIBRARIES = libllvmradeon@[email protected]
+libllvmradeon@VERSION@_la_LDFLAGS = -Wl,--no-undefined -shared -avoid-version \
+ $(LLVM_LDFLAGS)
+else
+noinst_LTLIBRARIES = libllvmradeon@[email protected]
+endif
+else
+noinst_LTLIBRARIES = libllvmradeon@[email protected]
+endif
+
+AM_CXXFLAGS = \
+ $(filter-out -DDEBUG, $(LLVM_CXXFLAGS)) \
+ $(DEFINES)
+
+AM_CFLAGS = \
+ $(GALLIUM_CFLAGS) \
+ $(LLVM_CFLAGS)
+
+libllvmradeon@VERSION@_la_SOURCES = \
+ $(CPP_FILES) \
+ $(C_FILES)
+
+libllvmradeon@VERSION@_la_LIBADD = \
+ $(top_builddir)/src/gallium/auxiliary/libgallium.la \
+ $(CLOCK_LIB) \
+ $(LLVM_LIBS)
diff --git a/src/gallium/drivers/radeon/Makefile.sources b/src/gallium/drivers/radeon/Makefile.sources
index 45d2e8f2e76..39f9532fe40 100644
--- a/src/gallium/drivers/radeon/Makefile.sources
+++ b/src/gallium/drivers/radeon/Makefile.sources
@@ -1,5 +1,5 @@
-CPP_SOURCES := \
+CPP_FILES := \
radeon_llvm_emit.cpp
-C_SOURCES := \
+C_FILES := \
radeon_setup_tgsi_llvm.c
diff --git a/src/gallium/drivers/radeonsi/Makefile.am b/src/gallium/drivers/radeonsi/Makefile.am
index 7906fb6aa5f..595cf862744 100644
--- a/src/gallium/drivers/radeonsi/Makefile.am
+++ b/src/gallium/drivers/radeonsi/Makefile.am
@@ -23,7 +23,7 @@
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
-noinst_LIBRARIES = libradeonsi.a
+noinst_LTLIBRARIES = libradeonsi.la
AM_CPPFLAGS = \
-I$(top_srcdir)/src/gallium/drivers/radeon \
@@ -32,10 +32,9 @@ AM_CPPFLAGS = \
$(GALLIUM_CFLAGS)
AM_CFLAGS = $(LLVM_CFLAGS)
-# This is a hack until we can move the backend into the LLVM project.
-# We need to use mklib, because it splits up libradeon.a into object files
-# so that we can link it with the radeonsi objects.
-libradeonsi_a_AR = $(top_srcdir)/bin/mklib -o radeonsi -static
+libradeonsi_la_SOURCES = $(C_SOURCES)
+libradeonsi_la_LIBADD = ../radeon/libllvmradeon@[email protected]
-libradeonsi_a_SOURCES = $(C_SOURCES)
-libradeonsi_a_LIBADD = ../radeon/libradeon.a
+#XXX: Delete this when all radeonsi targets are converted to automake.
+all-local: libradeonsi.la
+ ln -f $(builddir)/.libs/libradeonsi.a $(builddir)/libradeonsi.a