[Top][All Lists]

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

Re: Newbie: packaging executables with libraries, how to build?

From: Tom Tromey
Subject: Re: Newbie: packaging executables with libraries, how to build?
Date: 08 Feb 2002 15:42:30 -0700

>>>>> "Chad" == Chad McHenry <address@hidden> writes:

Chad> (top-sourcedir)/src/bindings
Chad> (top-sourcedir)/src/execs
Chad> (top-sourcedir)/src/include
Chad> (top-sourcedir)/src/lib

Chad> I'm wondering what the best way to go about linking the
Chad> libraries to the executables is?  It seems like both (exe and
Chad> libs) should be built when 'make' is issued, and both installed
Chad> when 'make install' issued, yet how to link the exe's to the
Chad> libraries if they aren't yet installed?

Typically if you're installing a library then you are using libtool.
Not many people build static-only installed libraries.

Given that, in src/exec/ you'd write something like:

    bin_PROGRAMS = foo
    foo_SOURCES = ...
    foo_LDADD = ../lib/

Chad> Also, in the sense of easing development, where would one put
Chad> included headers to avoid the same 'make install' prior to
Chad> 'make'ing the executables?

It is a matter of personal preference.
You can tell automake to pass -I options pointing wherever you decide.
You definitely *don't* want to require any sort of installation before
the build can complete.  If you try something like this, it will be an
uphill struggle.  Automake assumes that the build goes "configure;
make all; make install".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]