automake
[Top][All Lists]
Advanced

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

Re: build .o files to specific directory using automake


From: Steffen Dettmer
Subject: Re: build .o files to specific directory using automake
Date: Wed, 17 Mar 2010 16:43:25 +0100

> > > Usually makefile generated by automake will compile each
> > > source file and output .o file in the same directory of the
> > > source file. How to let automake output .o files to a
> > > specific directory at the same time savely link them to my
> > > program/library?
>
> * scleung wrote on Wed, Mar 17, 2010 at 03:29:15AM CET:
> > I have searched some related threads and seems that it won't
> > work like this way.
> > All suggestions were using VPATH build.

What is the problem with this?

> > So does it possible to change the current directory in
> > configure script to specify the builddir?
>
> Yes, by calling the configure script *from* the builddir-to-be,
> i.e., with the builddir as current directory.

And it is easy!

If you have `mypackage' with configure.ac, Makefile.am, sources
etc. then just simply do:

$ cd mypackage
$ mkdir Debug
$ cd Debug
$ ../configure --enable-debug && make all check

and you can build a second configuration:
$ cd ..
$ mkdir Release
$ cd Release
$ ../configure --disable-debug && make distcheck

This is lovely, isn't it? :-)

oki,

Steffen




reply via email to

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