[Top][All Lists]

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

Re: Generate objects in right directory

From: Alan D. Salewski
Subject: Re: Generate objects in right directory
Date: Wed, 3 Sep 2008 12:23:19 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

On Wed, Sep 03, 2008 at 05:41:29PM +0200, Sebastien REYNES spake thus:
> Hello,
> How to generate objects files in a dedicated directory ? When I launch
> the following in my current directory
> /home/devbdie/src/module1, the files *.o are generated in the same
> directory.
> lib_LIBRARIES = libcomc.a
> nodist_libcomc_a_SOURCES = prog1.c prog2.c prog3.c
> Where can I specify a different target object directory ?
> (/home/devbdie/obj/module1 for instance) Have I to set a parameter
> within the file ? How can I do ?
> Thank you in advance for your help
> S├ębastien

If you do a VPATH build, then the generated object files will already be
in a separate directory. This is often done by simply creating a
directory that is a peer of your top-level project directory and
invoking 'configure' from there:

    $ ls -F
    $ mkdir my-project-BUILD && cd my-project-BUILD
    $ ../my-project/configure
    $ make

Automake distinguishes between the source directory and the build
directory. However, if you configure and build from within the source
directory, then the source directory and the build directory are the
same, and your generated artifacts end up in the same directories as
their template or input artifacts.


a l a n   d.   s a l e w s k i             address@hidden
                 [excessively lame haiku deleted] 
Generated from Haiku-O-Matic: 

reply via email to

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