1include $(top_srcdir)/src/gallium/Automake.inc
2
3AM_CFLAGS = \
4	$(GALLIUM_TARGET_CFLAGS)
5
6xvmcdir = $(XVMC_LIB_INSTALL_DIR)
7xvmc_LTLIBRARIES = libXvMCgallium.la
8
9nodist_EXTRA_libXvMCgallium_la_SOURCES = dummy.cpp
10libXvMCgallium_la_SOURCES =
11
12libXvMCgallium_la_LDFLAGS = \
13	-shared \
14	-module \
15	-no-undefined \
16	-version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
17	$(GC_SECTIONS) \
18	$(LD_NO_UNDEFINED)
19
20if HAVE_LD_VERSION_SCRIPT
21libXvMCgallium_la_LDFLAGS += \
22	-Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc/xvmc.sym
23endif # HAVE_LD_VERSION_SCRIPT
24
25libXvMCgallium_la_LIBADD = \
26	$(top_builddir)/src/gallium/state_trackers/xvmc/libxvmctracker.la \
27	$(top_builddir)/src/gallium/auxiliary/libgalliumvlwinsys.la \
28	$(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \
29	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
30	$(top_builddir)/src/util/libmesautil.la \
31	$(XVMC_LIBS) \
32	$(VL_LIBS) \
33	$(XCB_DRI3_LIBS) \
34	$(LIBDRM_LIBS) \
35	$(GALLIUM_COMMON_LIB_DEPS)
36
37EXTRA_libXvMCgallium_la_DEPENDENCIES = xvmc.sym
38EXTRA_DIST = xvmc.sym meson.build
39
40TARGET_DRIVERS =
41TARGET_CPPFLAGS =
42TARGET_LIB_DEPS =
43
44include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
45
46include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc
47
48if HAVE_GALLIUM_STATIC_TARGETS
49
50libXvMCgallium_la_SOURCES += target.c
51libXvMCgallium_la_CPPFLAGS = $(TARGET_CPPFLAGS)
52libXvMCgallium_la_LIBADD += \
53	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
54	$(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
55	$(TARGET_LIB_DEPS) \
56	$(TARGET_COMPILER_LIB_DEPS) \
57	$(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
58
59else # HAVE_GALLIUM_STATIC_TARGETS
60libXvMCgallium_la_LIBADD += \
61	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.la
62
63endif # HAVE_GALLIUM_STATIC_TARGETS
64
65if HAVE_GALLIUM_LLVM
66libXvMCgallium_la_LIBADD += $(LLVM_LIBS)
67libXvMCgallium_la_LDFLAGS += $(LLVM_LDFLAGS)
68endif
69
70# hardlink each megadriver instance, but don't actually have
71# libXvMCgallium.so in the set of final installed files.
72install-data-hook:
73	$(AM_V_GEN)dest_dir=$(DESTDIR)/$(xvmcdir);			\
74	for i in $(TARGET_DRIVERS); do					\
75		j=libXvMCgallium.$(LIB_EXT);				\
76		k=libXvMC$${i}.$(LIB_EXT);				\
77		l=$${k}.$(XVMC_MAJOR).$(XVMC_MINOR).0;			\
78		ln -f $${dest_dir}/$${j}.$(XVMC_MAJOR).$(XVMC_MINOR).0	\
79		      $${dest_dir}/$${l};				\
80		ln -sf $${l}						\
81		       $${dest_dir}/$${k}.$(XVMC_MAJOR).$(XVMC_MINOR);	\
82		ln -sf $${l}						\
83		       $${dest_dir}/$${k}.$(XVMC_MAJOR);		\
84		ln -sf $${l}						\
85		       $${dest_dir}/$${k};				\
86	done;								\
87	$(RM) $${dest_dir}/libXvMCgallium.*;				\
88	$(RM) -d $${dest_dir} &>/dev/null || true
89
90uninstall-hook:
91	for i in $(TARGET_DRIVERS); do					\
92		$(RM) $(DESTDIR)$(xvmcdir)/libXvMC$${i}.so{,.$(XVMC_MAJOR){,.$(XVMC_MINOR){,.0}}}; \
93	done;
94