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