autoconf
[Top][All Lists]
Advanced

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

problem to use autoconf/automake


From: Nicolas Haller
Subject: problem to use autoconf/automake
Date: Mon, 25 Apr 2005 20:43:40 +0200
User-agent: Mutt/1.5.6+20040907i

Good day,

I am writing a program in C++ and I want to use autotools to help me to
build my program.

But I have a problem but I don't know if it's an automake or an autoconf
problem.

I have organized my "working directory" in some subdirectory. It's look
like this:

RSA
|
 \build
  |Makefile.am
 \doc
 \config
 \lib
 \test
 \src
  \interface
   |mainwindow.cc
   |mainwindow.hh
   |trousseauwindows.cc
   |trousseauwindows.hh
  \crypt
  \sign
  \gestkeys
 |main.cc
|configure.ac
|Makefile.am

So I want all object file and program in build directory but I have some
problem to do that.
config contain file generated by autotools and src contains juste my
program sources.

For now, I have a top Makefile.am with this only line
SUBDIRS = build doc test lib

And in build directory, the Makefile.am look like this:

bin_PROGRAMS=RSA
RSA_SOURCES=../src/main.cc \
            ../src/interface/mainwindow.cc \
            ../src/interface/trousseauwindows.cc

AM_CXXFLAGS=-g -W -Wall ${GTKMM_CFLAGS}
AM_LDFLAGS=${GTKMM_LIBS}

So, I have all objects and program in build directory but for exemple,
in main.cc I have 
#include "interface/mainwindow.hh"
but in mainwindow.cc I can type
#include "mainwindow.hh"
the interface/ is not needed

So, all work but I sure is not a good method. It's not
recursive(for src) but I think is not the alternative too. I search in
documentation some help but I found nothing can help me. It's maybe
variables top_srcdir srcdir or builddir I see in generated makefile but
I don't know where redefine these variable.

-- 
Nicolas Haller  -  L2-C(3) Promo 2008
Avec Windows 98, on était au bord du précipice.
Avec Windows XP, on a fait un grand pas en avant.




reply via email to

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