Questions tagged [automake]

Automake is a tool provided by GNU for the purpose of automating the generation of portable, configurable Makefiles.

Automake is a tool for automatically generating Makefile.ins from files called Makefile.am. Each Makefile.am is basically a series of make variable definitions, with rules being thrown in occasionally. The generated Makefile.ins are compliant with the GNU Makefile standards.

The GNU Makefile Standards Document (see Makefile Conventions) is long, complicated, and subject to change. The goal of Automake is to remove the burden of Makefile maintenance from the back of the individual GNU maintainer (and put it on the back of the Automake maintainers).

The typical Automake input file is simply a series of variable definitions. Each such file is processed to create a Makefile.in. There should generally be one Makefile.am per directory of a project.

Automake does constrain a project in certain ways; for instance, it assumes that the project uses Autoconf (see Introduction), and enforces certain restrictions on the configure.ac contents.

For more details, take a look into automake manual

1092 questions
9
votes
3 answers

autotools: force make not to rebuild configure/Makefile

I have a project with autotools: automake, autoconf. I want to prohibit make from remaking files configure, Makefile.in, etc; just to do compile job. Some of files are edited by hand, and I know that I should not to do this. (Or the project was…
osgx
  • 90,338
  • 53
  • 357
  • 513
9
votes
1 answer

Automake not generating Makefile.in in subdirs

First off I just want to say, I'm a total newb at Autotools. I have a project with the following structure: +-src +-commands Makefile.am +-copy Makefile.am copy.h copy.cpp +-delete Makefile.am delete.h …
Sam Washburn
  • 1,817
  • 3
  • 25
  • 43
9
votes
1 answer

C++: ::ntohs() fails on higher optimization levels

I have a .cpp file: htonstest.cpp. I use g++ to compile it: $ g++ -o test htonstest.cpp It works, and the program ./test works too. But, when I use automake to compile it, has a compile error: htonstest.cpp: In function ‘int main()’: …
yetuweiba
  • 241
  • 1
  • 4
  • 13
9
votes
2 answers

Precompiled headers with Autotools

Is it possible to use gcc precompiled headers in projects using automake / libtool? Adding new make rules to build precompiled headers is not difficult. The issue is that you also have to add compilation flags introduced by libtool and AFAIK it…
Dj Gaspa
  • 253
  • 1
  • 2
  • 9
9
votes
4 answers

How do I get autotools to compile with the Intel compiler?

I want my code to compile with the Intel compiler(s) or with gcc/g++ depending on a configure argument. Is this possible? What do I need to put in my configure.ac and Makefile.am files to make this happen?
Daisy Sophia Hollman
  • 6,046
  • 6
  • 24
  • 35
9
votes
3 answers

How to cross-compile C++-library with dependencies?

I need to cross-compile some C/C++ library. The library depends on several C/C++ libraries. Some of those of libraries in turn depend on other libraries. All libraries come with configure script. I know how to compile and install libraries on host…
pic11
  • 14,267
  • 21
  • 83
  • 119
8
votes
1 answer

How to package data files with GNU's autoconf and automake

I am a rather new C++ programmer. I have made a very simple game using SDL libraries. My game, naturally, uses some images, sounds and fonts. I have wanted to make a distribution of the package, where user's can configure && make . It's not like…
yasar
  • 13,158
  • 28
  • 95
  • 160
8
votes
1 answer

Libtool install warning: xxx.la has not been installed in /user/local/lib

While using autoreconf & automake & libtool to build and install my application, I always get warning "libtool: warning: xxx.la has not been installed in /user/local/lib" and "libtool: warning: remember to run 'libtool --finish /usr/local/lib". I…
Jes
  • 2,614
  • 4
  • 25
  • 45
8
votes
1 answer

Installing pkg-config files to proper path on CentOS with automake

I have a couple projects I maintain that are built using automake (let's call them lib1 and lib2). lib2 is dependent on lib1 as a library and I'm having some issues with the pkg-config defaults on CentOS. Ideally, I'd like users to not have to set…
Bill Brasky
  • 2,614
  • 2
  • 19
  • 20
8
votes
1 answer

Using pkg-config with autotools

I'm learning about the autotools and made it through a hello world scenario and now wanted to try wrapping up some cppunit tests into a package and build it using the autotools. In order to build the package, cppunit would have to be installed on…
Stephen Burke
  • 882
  • 3
  • 10
  • 25
8
votes
2 answers

Recommended way to use Autoconf Archive macros and other 3rd party macros

I found several useful macros in the Autoconf Archive, and also a useful m4 file which helps test Boost library support. The Autoconf Archive is hosted by GNU and the Boost m4 helper is hosted as a GitHub repo. I'd like to use them in a C++ project…
8
votes
2 answers

How do you set the order of libraries in automake?

How do you set the order of libraries in automake? In my am file I have something like: myprog_DEPENDENCIES = adhoc-target myprog_SOURCES = myprog.c myprog_LDADD = libmine.la myprog_LDFLAGS = -static -L/home/user/lib -ladhoc Now, when I compile I…
Crazy Chenz
  • 12,650
  • 12
  • 50
  • 62
8
votes
2 answers

Make autoconf "check" target without running it

Is there a way to compile the "check" target of an autoconf project without running it? I have Eclipse Juno with the "C/C++ Unit Test" plugin. I would like to be able to make the check target, then run it in the context of the plugin so that I can…
Ed K
  • 189
  • 2
  • 9
8
votes
4 answers

Setting per-file flags with automake

Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for which I want to disable a particular warning, what could I do? I tried something…
Paolo Tedesco
  • 55,237
  • 33
  • 144
  • 193
8
votes
1 answer

Building SDL2 with NDK toolchain

I wonder if anyone did managed to build the fresh SDL2 with the toolchain of the Android NDK(r8d). SDL2 seems to be very close to the release (since yesterday it isn't "UNDER CONSTROCTION anymore: http://hg.libsdl.org/SDL/rev/0a3d2ec7af6d). It comes…
drayman
  • 83
  • 5