Re: Autoconf building, linking across multiple source directories?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf Wildenhues wrote:
> For what little it's worth, I'd write that as
> 
> src/Makefile.am:
> noinst_LIBRARIES = libtest.a
> libtest_a_SOURCES = foo.cc bar.cc
> bin_PROGRAMS = myprog
> myprog_SOURCES = main.cc
> myprog_LDADD = libtest.a
> 
> tests/Makefile.am:
> check_PROGRAMS = testrunner
> testrunner_SOURCES = testrunner.cc foo_test.cc bar_test.cc
> testrunner_LDADD = ../src/libtest.a

Oh yes - that is better. It didn't even occur to me to use the library
in both the testrunner and the app - duh. I would have eventually seen
that, but I never work as well off the cuff.

Thanks,
John
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkhz1FgACgkQdcgqmRY/OH+uLQCfXPLAy8u+f4x+DC7tzcRSjP69
3BkAnjEHwfOnaTzoRJjtATG9kbx/9XR9
=mwYL
-----END PGP SIGNATURE-----


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux