Reorder linked libraries so we better support --as-needed linker flag used
by some distributions (i.e. Gentoo).
Patch suggested by Diego Elio Pettenò <flameeyes <at> gmail.com>
liblvm2cmd.$(LIB_SUFFIX): liblvm2cmd.a $(LDDEPS)
$(CC) -shared -Wl,-soname,$@.$(LIB_VERSION) \
- $(CFLAGS) $(CLDFLAGS) -o $@ $(LVMLIBS) $(LIBS) \
- @CLDWHOLEARCHIVE@ liblvm2cmd.a @CLDNOWHOLEARCHIVE@
+ $(CFLAGS) $(CLDFLAGS) -o $@ \
+ @CLDWHOLEARCHIVE@ liblvm2cmd.a @CLDNOWHOLEARCHIVE@ \
+ $(LVMLIBS) $(LIBS)
liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX)
$(LN_S) -f $< $@