• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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	$(LIBDRM_LIBS) \
34	$(GALLIUM_COMMON_LIB_DEPS)
35
36EXTRA_libXvMCgallium_la_DEPENDENCIES = xvmc.sym
37EXTRA_DIST = xvmc.sym
38
39TARGET_DRIVERS =
40TARGET_CPPFLAGS =
41TARGET_LIB_DEPS =
42
43include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc
44
45include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc
46
47if HAVE_GALLIUM_STATIC_TARGETS
48
49libXvMCgallium_la_SOURCES += target.c
50libXvMCgallium_la_CPPFLAGS = $(TARGET_CPPFLAGS)
51libXvMCgallium_la_LIBADD += \
52	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \
53	$(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \
54	$(TARGET_LIB_DEPS) \
55	$(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON)
56
57else # HAVE_GALLIUM_STATIC_TARGETS
58libXvMCgallium_la_LIBADD += \
59	$(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.la
60
61endif # HAVE_GALLIUM_STATIC_TARGETS
62
63if HAVE_GALLIUM_LLVM
64libXvMCgallium_la_LIBADD += $(LLVM_LIBS)
65libXvMCgallium_la_LDFLAGS += $(LLVM_LDFLAGS)
66endif
67
68# hardlink each megadriver instance, but don't actually have
69# libXvMCgallium.so in the set of final installed files.
70install-data-hook:
71	$(AM_V_GEN)dest_dir=$(DESTDIR)/$(xvmcdir);			\
72	for i in $(TARGET_DRIVERS); do					\
73		j=libXvMCgallium.$(LIB_EXT);				\
74		k=libXvMC$${i}.$(LIB_EXT);				\
75		l=$${k}.$(XVMC_MAJOR).$(XVMC_MINOR).0;			\
76		ln -f $${dest_dir}/$${j}.$(XVMC_MAJOR).$(XVMC_MINOR).0	\
77		      $${dest_dir}/$${l};				\
78		ln -sf $${l}						\
79		       $${dest_dir}/$${k}.$(XVMC_MAJOR).$(XVMC_MINOR);	\
80		ln -sf $${l}						\
81		       $${dest_dir}/$${k}.$(XVMC_MAJOR);		\
82		ln -sf $${l}						\
83		       $${dest_dir}/$${k};				\
84	done;								\
85	$(RM) $${dest_dir}/libXvMCgallium.*
86
87uninstall-hook:
88	for i in $(TARGET_DRIVERS); do					\
89		$(RM) $(DESTDIR)$(xvmcdir)/libXvMC$${i}.so{,.$(XVMC_MAJOR){,.$(XVMC_MINOR){,.0}}}; \
90	done;
91