1include $(top_srcdir)/src/gallium/Automake.inc 2 3AM_CFLAGS = \ 4 $(GALLIUM_TARGET_CFLAGS) 5 6vdpaudir = $(VDPAU_LIB_INSTALL_DIR) 7vdpau_LTLIBRARIES = libvdpau_gallium.la 8 9nodist_EXTRA_libvdpau_gallium_la_SOURCES = dummy.cpp 10libvdpau_gallium_la_SOURCES = 11 12libvdpau_gallium_la_LDFLAGS = \ 13 -shared \ 14 -module \ 15 -no-undefined \ 16 -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \ 17 $(GC_SECTIONS) \ 18 $(LD_NO_UNDEFINED) 19 20if HAVE_LD_VERSION_SCRIPT 21libvdpau_gallium_la_LDFLAGS += \ 22 -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau/vdpau.sym 23endif # HAVE_LD_VERSION_SCRIPT 24 25if HAVE_LD_DYNAMIC_LIST 26libvdpau_gallium_la_LDFLAGS += \ 27 -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn 28endif # HAVE_LD_DYNAMIC_LIST 29 30# NOTE: libvdpau_gallium does not use(link against) libvdpau 31libvdpau_gallium_la_LIBADD = \ 32 $(top_builddir)/src/gallium/state_trackers/vdpau/libvdpautracker.la \ 33 $(top_builddir)/src/gallium/auxiliary/libgalliumvlwinsys.la \ 34 $(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \ 35 $(top_builddir)/src/gallium/auxiliary/libgallium.la \ 36 $(top_builddir)/src/util/libmesautil.la \ 37 $(VL_LIBS) \ 38 $(XCB_DRI3_LIBS) \ 39 $(LIBDRM_LIBS) \ 40 $(GALLIUM_COMMON_LIB_DEPS) 41 42EXTRA_libvdpau_gallium_la_DEPENDENCIES = \ 43 vdpau.sym \ 44 $(top_srcdir)/src/gallium/targets/dri-vdpau.dyn 45EXTRA_DIST = \ 46 vdpau.sym \ 47 $(top_srcdir)/src/gallium/targets/dri-vdpau.dyn \ 48 meson.build 49 50TARGET_DRIVERS = 51TARGET_CPPFLAGS = 52TARGET_LIB_DEPS = 53 54include $(top_srcdir)/src/gallium/drivers/nouveau/Automake.inc 55 56include $(top_srcdir)/src/gallium/drivers/r300/Automake.inc 57include $(top_srcdir)/src/gallium/drivers/r600/Automake.inc 58include $(top_srcdir)/src/gallium/drivers/radeonsi/Automake.inc 59 60if HAVE_GALLIUM_STATIC_TARGETS 61 62libvdpau_gallium_la_SOURCES += target.c 63libvdpau_gallium_la_CPPFLAGS = $(TARGET_CPPFLAGS) 64libvdpau_gallium_la_LIBADD += \ 65 $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_static.la \ 66 $(GALLIUM_PIPE_LOADER_WINSYS_LIBS) \ 67 $(TARGET_LIB_DEPS) \ 68 $(TARGET_COMPILER_LIB_DEPS) \ 69 $(TARGET_RADEON_WINSYS) $(TARGET_RADEON_COMMON) 70 71else # HAVE_GALLIUM_STATIC_TARGETS 72 73libvdpau_gallium_la_LIBADD += \ 74 $(top_builddir)/src/gallium/auxiliary/pipe-loader/libpipe_loader_dynamic.la 75 76endif # HAVE_GALLIUM_STATIC_TARGETS 77 78if HAVE_GALLIUM_LLVM 79libvdpau_gallium_la_LIBADD += $(LLVM_LIBS) 80libvdpau_gallium_la_LDFLAGS += $(LLVM_LDFLAGS) 81endif 82 83if HAVE_COMPAT_SYMLINKS 84# Add a link to allow setting VDPAU_DRIVER_PATH to /lib/gallium of the build tree. 85all-local: $(vdpau_LTLIBRARIES) 86 $(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium; \ 87 $(MKDIR_P) $${link_dir}; \ 88 for i in $(TARGET_DRIVERS); do \ 89 j=libvdpau_gallium.$(LIB_EXT); \ 90 k=libvdpau_$${i}.$(LIB_EXT); \ 91 l=$${k}.$(VDPAU_MAJOR).$(VDPAU_MINOR).0; \ 92 ln -f .libs/$${j}.$(VDPAU_MAJOR).$(VDPAU_MINOR).0 \ 93 $${link_dir}/$${l}; \ 94 ln -sf $${l} \ 95 $${link_dir}/$${k}.$(VDPAU_MAJOR).$(VDPAU_MINOR); \ 96 ln -sf $${l} \ 97 $${link_dir}/$${k}.$(VDPAU_MAJOR); \ 98 ln -sf $${l} \ 99 $${link_dir}/$${k}; \ 100 done 101 102clean-local: 103 $(AM_V_GEN)link_dir=$(top_builddir)/$(LIB_DIR)/gallium; \ 104 $(AM_V_GEN)for i in $(TARGET_DRIVERS); do \ 105 $(RM) $${link_dir}/libvdpau_$${i}.so{,.$(VDPAU_MAJOR){,.$(VDPAU_MINOR){,.0}}}; \ 106 done; 107endif 108 109# hardlink each megadriver instance, but don't actually have 110# libvdpau_gallium.so in the set of final installed files. 111install-data-hook: 112 $(AM_V_GEN)dest_dir=$(DESTDIR)/$(vdpaudir); \ 113 for i in $(TARGET_DRIVERS); do \ 114 j=libvdpau_gallium.$(LIB_EXT); \ 115 k=libvdpau_$${i}.$(LIB_EXT); \ 116 l=$${k}.$(VDPAU_MAJOR).$(VDPAU_MINOR).0; \ 117 ln -f $${dest_dir}/$${j}.$(VDPAU_MAJOR).$(VDPAU_MINOR).0 \ 118 $${dest_dir}/$${l}; \ 119 ln -sf $${l} \ 120 $${dest_dir}/$${k}.$(VDPAU_MAJOR).$(VDPAU_MINOR); \ 121 ln -sf $${l} \ 122 $${dest_dir}/$${k}.$(VDPAU_MAJOR); \ 123 ln -sf $${l} \ 124 $${dest_dir}/$${k}; \ 125 done; \ 126 $(RM) $${dest_dir}/libvdpau_gallium.*; \ 127 $(RM) -d $${dest_dir} &>/dev/null || true 128 129uninstall-hook: 130 for i in $(TARGET_DRIVERS); do \ 131 $(RM) $(DESTDIR)$(vdpaudir)/libvdpau_$${i}.so{,.$(VDPAU_MAJOR){,.$(VDPAU_MINOR){,.0}}}; \ 132 done; 133