My comments inline. Sebastien REYNES wrote: > Here is more precision about the problem : > > In the file Makefile.am of a module "ate_calcul_diametre_rayon", I have > added the following line : > AUTOMAKE_OPTIONS = subdir-objects
This tells automake to store the objects in subdirectories of the top build directory, not what the top build directory is. > In the configure.ac of the root (/home/devbdie), I have have added the > following line : > AM_PROG_CC_C_O(/home/devbdie/obj/) I can't find any documentation on the argument of AM_PROG_CC_C_O, or AC_PROG_CC_C_O to which it refers. Can anyvody enlighten me? > Then I have launched ./configure. Because you invoke ./configure in your top source directory, this directory will also become your top build directory. To use a different top build directory do $ mkdir path/to/top/build/directory $ cd path/to/top/build/directory $ abs/or/rel/path/to/top/source/directory/configure $ make > When I launched the command make from the directory > /home/devbdie/src/ate_calcul_diametre_rayon, the objects files *.o are > still > generated in the current directory, not in the directory > /home/devbdie/obj/ate_calcul_diametre_rayon `make` should always be invoked in the build directory. In your case this is the same as the source directory (see above), so this result is correct. Hope this helps. Jeroen. > ----- Original Message ----- > From: "Sebastien REYNES" <[EMAIL PROTECTED]> > To: "Jeroen N. Witmond [Bahco]" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]>; <[email protected]> > Sent: Monday, September 08, 2008 10:42 AM > Subject: Re: Generate objects in right directory > > >> It doesn't work : this command don't change the target directory of the >> objects files. When I launch the make command from a source directory, >> the >> objects files are generated in the same directory. How can I do ? >> Thank you. >> >> ----- Original Message ----- >> From: "Jeroen N. Witmond [Bahco]" <[EMAIL PROTECTED]> >> To: "Sebastien REYNES" <[EMAIL PROTECTED]> >> Cc: <[EMAIL PROTECTED]>; <[email protected]> >> Sent: Friday, September 05, 2008 5:09 PM >> Subject: Re: Generate objects in right directory >> >> >> > Add >> > AUTOMAKE_OPTIONS = subdir-objects >> > to the Makefile.am >> > >> > > Yes I have read this but I believe this solution don't answer to my >> need. >> > > In fact, I must to respect this treeview from root : >> > > >> > > /home/devbdie/ >> > > configure.ac >> > > Makefile >> > > Makefile.am >> > > ... >> > > /home/devbdie/src/module1/ >> > > Makefile >> > > Makefile.am >> > > module1.c >> > > ... >> > > /home/devbdie/src/module2/ >> > > Makefile >> > > Makefile.am >> > > module2.c >> > > ... >> > > /home/devbdie/obj/module1 >> > > module1.o >> > > ... >> > > /home/devbdie/obj/module2 >> > > module2.o >> > > ... >> > > /home/devbdie/bin/ >> > > module1 >> > > module2 >> > > ... >> > > >> > > >> > > I would like to put automatically the files *.o in the appropriate >> > > directory. When I launch "make" from the root, object files have to >> be >> > > generated into all objects directories. When I launch "make" from a >> source >> > > directory, src/module1 for exemple, the object files corresponding > have >> to >> > > be generated into obj/module1 only). >> > > I hope this time my description is more clear. Do you see a simple >> > > solution ? >> > > >> > > Regards, >> > > Sébastien >> > > >> > > >> > > >> > >> > >> > >
