Hello Xochitl, * Xochitl Lunde wrote on Thu, Apr 22, 2010 at 05:48:20PM CEST: > I have a problem with my dependency tracking in my auto tools build. I > have a program like this for an embedded target:
> pald_LDADD = $(am_ldadd) > > am_ldadd = \ > -lstartup > There are more libraries in am_ldadd, but I wanted to shorten it. > Basically if I use "-lstartup" in my am_ldadd, the "pald" program does not > get relinked if I make a change in "libstartup.a", even though > "libstartup.a" does get relinked. If I change my reference of > libstartup.a from "-lstartup" to "$(top_srcdir)/src/startup/libstartup.a", > then "pald" does relink. What is wrong with using the "-l" instead of > specifying the full library name? See 'info Automake Linking', the final paragraph, also here: <http://www.gnu.org/software/automake/manual/html_node/Linking.html#Linking> > I think I had switched to using "-l" > exclusivey because on some platforms I use dynamic libraries instead and I > didn't want to have to rewrite long lists in Makefile.am for platforms > that make dynamic libraries. With shared libraries, you can use libtool and list the .la file in *_LDADD. Then everything will work as you desire. Cheers, Ralf