automake
[Top][All Lists]
Advanced

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

Re: redirecting produced files


From: Stefan Puiu
Subject: Re: redirecting produced files
Date: Mon, 28 Aug 2006 10:12:02 +0300

Hi,

I'm by no means an autotools expert, but there's a simple way to
achieve something somewhat similar to what you want.

You could run 'autoreconf -fvi' in your source directory, and then,
depending on your arch/configuration, you can type:

cd ../../bin/[os]/[compiler]/[debug/release]
<source_dir>/configure <debug/release and other options>

However, that would put both objects, libraries and binaries under the
build directory (replicating the structure of your source directory).
You can always have your toplevel Makefile.am put the resulting
binaries in a bin directory, so then you could have:

../../[os]/[compiler]/[debug/release] as build directory
../../[os]/[compiler]/[debug/release]/bin for binaries
../../[os]/[compiler]/[debug/release]/src for objects, if src is where
your sources are.

I'm using something similar (one OS though, but different sets of
configure options), based on an older post on this list by Ralf
Wildenhues.

Stefan.

On 8/26/06, Isajha <address@hidden> wrote:
For this question i produced little example program without I got the
following automake (and autoconf) code - the real code is made up of
several static and dynamic libraries as well as several executables.

If you got a solution for me that might cause problems with debugging,
linking, clean-up or anything else please mention it. I try to produce a
non recursive makefile but im stuck already at the very beginning.

Here the test program:

Makefile.am
    bin_PROGRAMS = helloworldlinux client
    helloworldlinux_SOURCES = ../../src/helloworldlinux/HelloWorldLinux.cpp
    client_SOURCES = ../../src/client/MainLinux.cpp

configure in.
    AC_INIT(test,0.1)
    AM_INIT_AUTOMAKE
    AC_PROG_CXX
    AC_PROG_INSTALL
    AC_OUTPUT(Makefile)

The directory layout seems ok the file gets compiled and is linked - no
errors.
My problem is that the resulting executable (helloworldlinux in small
letters) as well as the generated HelloWorldLinux.o (with capital
letters) is located in the folder where the make file is.

I do not want these files within the source directory nor in the directy
of the makefile - the executable should be in
"../../bin/[os]/[compiler]/[debug/release]"
(an eventually produced static library in
"../../lib/[os]/[compiler]/[debug/release]") and the intermediate files
in "../../obj/[os]/[compiler]/[debug/release]")

Now im stuck since 5 days and i just don't find any solution. I'd love
to know how just to set the output directory and then perhaps the best
way to accomplish the [os]/[compiler]/[debug/release] and so on.

Perhaps im googling for the wrong terms and therefore can't find
anything. Any help would be very welcome. Thanks in advance.







reply via email to

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