• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include $(top_srcdir)/src/gallium/Automake.inc
2
3AM_CFLAGS = \
4	-I$(top_srcdir)/src/mapi \
5	-I$(top_srcdir)/src/mesa \
6	-I$(top_srcdir)/src \
7	-I$(top_srcdir)/src/mesa/drivers/dri/common \
8	-I$(top_srcdir)/src/gallium/state_trackers/dri \
9	$(GALLIUM_TARGET_CFLAGS)
10
11AM_CPPFLAGS = \
12	$(DEFINES) \
13        -DGALLIUM_DDEBUG \
14	-DGALLIUM_NOOP \
15	-DGALLIUM_RBUG \
16	-DGALLIUM_TRACE
17
18dridir = $(DRI_DRIVER_INSTALL_DIR)
19dri_LTLIBRARIES = gallium_dri.la
20
21nodist_EXTRA_gallium_dri_la_SOURCES = dummy.cpp
22gallium_dri_la_SOURCES =
23
24gallium_dri_la_LDFLAGS = \
25	-shared \
26	-shrext .so \
27	-module \
28	-no-undefined \
29	-avoid-version \
30	$(GC_SECTIONS) \
31	$(LD_NO_UNDEFINED)
32
33if HAVE_LD_VERSION_SCRIPT
34gallium_dri_la_LDFLAGS += \
35	-Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri/dri.sym
36endif # HAVE_LD_VERSION_SCRIPT
37
38if HAVE_LD_DYNAMIC_LIST
39gallium_dri_la_LDFLAGS += \
40	-Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
41endif # HAVE_LD_DYNAMIC_LIST
42
43gallium_dri_la_LIBADD = \
44	$(top_builddir)/src/mesa/libmesagallium.la \
45	$(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
46	$(top_builddir)/src/mesa/drivers/dri/common/libmegadriver_stub.la \
47	$(top_builddir)/src/gallium/state_trackers/dri/libdri.la \
48	$(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \
49	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
50        $(top_builddir)/src/gallium/drivers/ddebug/libddebug.la \
51	$(top_builddir)/src/gallium/drivers/noop/libnoop.la \
52	$(top_builddir)/src/gallium/drivers/rbug/librbug.la \
53	$(top_builddir)/src/gallium/drivers/trace/libtrace.la \
54	$(top_builddir)/src/mapi/shared-glapi/libglapi.la \
55	$(SELINUX_LIBS) \
56	$(EXPAT_LIBS) \
57	$(LIBDRM_LIBS) \
58	$(GALLIUM_COMMON_LIB_DEPS)
59
60EXTRA_gallium_dri_la_DEPENDENCIES = \
61	dri.sym \
62	$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
63EXTRA_DIST = \
64	SConscript \
65	meson.build \
66	dri.sym \
67	$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
68
69TARGET_DRIVERS =
70TARGET_CPPFLAGS =
71TARGET_LIB_DEPS =
72
73include $(top_srcdir)/src/gallium/drivers/i915/Automake.inc
74
75include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
76
77include $(top_srcdir)/src/gallium/drivers/r300/Automake.inc
78include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc
79include $(top_srcdir)/src/gallium/drivers/radeonsi/Automake.inc
80
81include $(top_srcdir)/src/gallium/drivers/svga/Automake.inc
82
83include $(top_srcdir)/src/gallium/drivers/freedreno/Automake.inc
84
85include $(top_srcdir)/src/gallium/drivers/vc4/Automake.inc
86include $(top_srcdir)/src/gallium/drivers/vc5/Automake.inc
87include $(top_srcdir)/src/gallium/drivers/pl111/Automake.inc
88
89include $(top_srcdir)/src/gallium/drivers/virgl/Automake.inc
90
91include $(top_srcdir)/src/gallium/drivers/etnaviv/Automake.inc
92include $(top_srcdir)/src/gallium/drivers/imx/Automake.inc
93
94include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
95include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
96include $(top_srcdir)/src/gallium/drivers/swr/Automake.inc
97
98if HAVE_GALLIUM_STATIC_TARGETS
99
100gallium_dri_la_SOURCES += target.c
101gallium_dri_la_CPPFLAGS = $(AM_CPPFLAGS) $(TARGET_CPPFLAGS)
102gallium_dri_la_LIBADD += \
103	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
104	$(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
105	$(TARGET_LIB_DEPS) \
106	$(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
107
108else # HAVE_GALLIUM_STATIC_TARGETS
109
110gallium_dri_la_LIBADD += \
111	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.la
112
113endif # HAVE_GALLIUM_STATIC_TARGETS
114
115if HAVE_GALLIUM_LLVM
116gallium_dri_la_LIBADD += $(LLVM_LIBS)
117gallium_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
118endif
119
120if HAVE_COMPAT_SYMLINKS
121# Add a link to allow setting LIBGL_DRIVERS_PATH to /lib/gallium of the build tree.
122all-local: $(dri_LTLIBRARIES)
123	$(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium;         \
124	$(MKDIR_P) $${link_dir};                                        \
125	for i in $(TARGET_DRIVERS); do                                  \
126		ln -f .libs/gallium_dri.so                              \
127			$${link_dir}/$${i}_dri.so;                      \
128	done
129
130clean-local:
131	$(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium;         \
132	$(AM_V_GEN)for i in $(TARGET_DRIVERS); do                       \
133		$(RM) $${link_dir}/$${i}_dri.so;                        \
134	done;
135endif
136
137# hardlink each megadriver instance, but don't actually have
138# gallium_dri.so in the set of final installed files.
139install-data-hook:
140	for i in $(TARGET_DRIVERS); do                                  \
141		ln -f $(DESTDIR)$(dridir)/gallium_dri.so                \
142		      $(DESTDIR)$(dridir)/$${i}_dri.so;                 \
143	done;                                                           \
144	$(RM) $(DESTDIR)$(dridir)/gallium_dri.*;                        \
145	$(RM) -d $(DESTDIR)$(dridir) &>/dev/null || true
146
147uninstall-hook:
148	for i in $(TARGET_DRIVERS); do                                  \
149		$(RM) $(DESTDIR)$(dridir)/$${i}_dri.so;                 \
150	done;
151