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
6
votes
2 answers

Compiling gentoo-bionic on a x86_64 linux machine

As you may know, Bionic is a C library used by Google to run Android applications. There are efforts to compile it in Linux machines, so it could be easily used outside Android. This is the code from one the latest efforts, originally called…
Ho1
  • 1,239
  • 1
  • 11
  • 29
6
votes
3 answers

What is ltmain.sh, and why does automake say it is missing? What is a good auto (make/conf/etc) generator?

I just want to develop a C app in linux with the auto(make/conf/...) stuff automatically generated. I tried generating it with ede and anjuta, but it doesn't seem to generate Makefile.am. So, I tried running automake, and it says "ltmain.sh" isn't…
gersh
  • 2,227
  • 4
  • 23
  • 23
6
votes
3 answers

Writing a Makefile.am to invoke googletest unit tests

I am trying to add my first unit test to an existing Open Source project. Specifically, I added a new class, called audio_manager: src/audio/audio_manager.h src/audio/audio_manager.cc I created a src/test directory structure that mirrors the…
Josh Glover
  • 25,142
  • 27
  • 92
  • 129
6
votes
0 answers

Android NDK: Using libtool library

The following library is created with autotools: Makefile.am: lib_LTLIBRARIES = libandi.la libandi_la_SOURCES = $(SMILE_SOURCES) libandi_la_CPPFLAGS = $(SMILE_CPPFLAGS) libandi_la_LIBADD = $(SMILE_LIBS) libandi_la_LDFLAGS =…
user2212461
  • 3,105
  • 8
  • 49
  • 87
6
votes
2 answers

check automake/autoconf version in configure script

I'm trying to edit a configure script that will execute this piece of code if it is above Automake version x.xx, and if it isn't, it executes a different piece of code. So, I need the version to be 1.10 or above, then when it is the case I want to…
Michael P.
  • 61
  • 1
  • 2
6
votes
1 answer

Undefined reference when compiling against libraries generated by Automake

I am having a pretty strange linking error in a project that uses automake. What I do seems pretty simple from the manual, so I really wonder what I can doing wrong ... My project has three folders : src/common, in which I compile a number of C++…
phtrivier
  • 13,047
  • 6
  • 48
  • 79
6
votes
2 answers

How can I get 'make uninstall' to remove empty directories as well as files?

When I uninstall an application using make uninstall it leaves over some empty directories which make install had created, e.g. such as /usr/share/foo/ and its subdirectories such as /usr/share/foo/applications, etc. I found via Google, that…
lanoxx
  • 12,249
  • 13
  • 87
  • 142
6
votes
2 answers

Automake, generated source files and VPATH builds

I'm doing VPATH builds with automake. I'm now also using generated source, with SWIG. I've got rules in Makefile.am like: dist_noinst_DATA = whatever.swig whatever.cpp: whatever.swig swig -c++ -php $^ Then the file gets used…
Craig McQueen
  • 41,871
  • 30
  • 130
  • 181
6
votes
3 answers

Autoconf - Where does config.h go?

I'm writing my own unit testing library (using autoconf, automake, and libtool) to better fit my needs (I don't need a super large amount of features, just a test runner and assertions). I have gotten to the point where it seems to be usable. Of…
alternative
  • 12,703
  • 5
  • 41
  • 41
6
votes
1 answer

Header dependency in automake

I'd like to create a Makefile.am file which generates one header file mentioned in a xxx.c file. Let's say that xxx.c contains: #include ... and that I have a rule to create it at the end of Makefile.am: version.h: echo '#define…
viraptor
  • 33,322
  • 10
  • 107
  • 191
6
votes
1 answer

Gnu autotools missing file depcomp

I'm trying to write a program that builds with autotools, however I have run into a problem when I try to make it. Automake seems to rely on a file called depcomp. I was wondering what this file does, and what I should fill it with/how I should make…
jepugs
  • 445
  • 4
  • 10
6
votes
1 answer

Conditional subdir-objects

I have option subdir-objects set in configure.ac: AM_INIT_AUTOMAKE([subdir-objects]) Is there any possibility to conditionally disable it in particular Makefiles (Makefile.am)? Thanks.
Andriy Moroz
  • 63
  • 1
  • 4
6
votes
3 answers

"make clean" doesn't clean dependencies with Automake?

I have a C++ project which uses Autoconf and Automake. I decided that there are too many source files in my src directory, and moved some files to a subdirectory. Then, I modified the Makefile.am and changed these files from source.cpp to…
petersohn
  • 11,292
  • 13
  • 61
  • 98
6
votes
1 answer

Why doesn't Libtool want to link with a static library?

I want to build a shared library that uses ZipArchive using GNU Autotools but I'm having this problem: Warning: linker path does not have real file for library -lziparch. I have the capability to make that library automatically link in when you link…
Gabi
  • 600
  • 2
  • 13
6
votes
1 answer

Libtool creates static library only - I need shared objects

I have a couple of C++ classes and I want to compile them into a shared library using autotools and libtool. These are my configure.ac and Makefile.am files: configure.ac: AC_PREREQ(2.67) AC_INIT(somelib.so, 1.0,…
Zbigh1
  • 379
  • 4
  • 13