install-lib-links.mk 765 Bytes
Newer Older
1 2 3
# Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree.

4
if BUILD_SHARED
5
if HAVE_COMPAT_SYMLINKS
6
all-local : .install-mesa-links
7

8
.install-mesa-links : $(lib_LTLIBRARIES)
9
	$(AM_V_GEN)$(MKDIR_P) $(top_builddir)/$(LIB_DIR);	\
10
	for f in $(join $(addsuffix .libs/,$(dir $(lib_LTLIBRARIES))),$(notdir $(lib_LTLIBRARIES:%.la=%.$(LIB_EXT)*))); do \
11 12 13 14 15 16
		if test -h .libs/$$f; then			\
			cp -d $$f $(top_builddir)/$(LIB_DIR);	\
		else						\
			ln -f $$f $(top_builddir)/$(LIB_DIR);	\
		fi;						\
	done && touch $@
17 18 19 20 21

clean-local:
	for f in $(notdir $(lib_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)); do \
		$(RM) $(top_builddir)/$(LIB_DIR)/$$f;	\
	done;
22
	$(RM) .install-mesa-links
23

24
endif
25
endif