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
0
votes
1 answer

Add .c files in a package using Autotools without compiling them

I have some .c files that get included in some unit tests (like #include "foo.c"). I don't want the build system to try to build those. It will fail. I just want to call 'make dist' and get those .c files included in the generated package. How do I…
ivarec
  • 2,542
  • 2
  • 34
  • 57
0
votes
1 answer

Trouble with development environment on osx-10.8.2

I have been learning a little about a lot lately and in the course of doing so seemed to bugger up my mac. Can someone please tell me what this means and how to go about fixing it? $ brew doctor Warning: "config" scripts exist outside your system…
pixel 67
  • 1,530
  • 18
  • 22
0
votes
1 answer

If statements not being properly evaluated (automake, makefile.am)

Now that I finally got xmonad to play nicely with MATE DE, I though I would try to port the GNOME2/3/XFCE4 panel applet over to mate, since MATE is fundamentally GNOME2. So far, I have added the necessary dependencies, ifdef's etc. for MATE, and…
geniass
  • 371
  • 1
  • 9
  • 20
0
votes
1 answer

gengetopt and Automake

I'm trying to include the generation of the cmdline.c file (from gengetopt's defaults) in my Makefile.am file. The file currently reads like these: bin_PROGRAMS = myprog myprog_SOURCES = main.c cmdline.c myprog_DEPENDENCIES = gen_cmdline…
ivarec
  • 2,542
  • 2
  • 34
  • 57
0
votes
1 answer

Passing configured variables to third party makefile with automake

I'm working with a project that is compiled using autotools. It contains an external library that only has a regular Makefile, when I run configure a Makefile from the top-level project is generated which contains recursively calls make on the…
cube
  • 3,867
  • 7
  • 32
  • 52
0
votes
1 answer

How to use automake to link two libs, one dynamically and the other statically?

Suppose I want to link the foo application with the bar and baz libs. Both support pkg-config and provide .pc files. The bar lib I want to link dynamically and the baz library I want to link statically. How can I achieve this with automake? My…
ivarec
  • 2,542
  • 2
  • 34
  • 57
0
votes
2 answers

How to choose a compiler version in Automake?

I have several compilers with the same name but of different versions or location. The ./configure script seems to stop at the first it finds in PATH. How can I tell Automake to choose one of them according to a custom rule ? I already have a macro…
alex_reader
  • 689
  • 1
  • 5
  • 22
0
votes
1 answer

Link only once to a library

I have my main application and two libraries: foo and bar. foo uses bar in some methods, and it has it specified in the LDADD. My main application uses foo, and indirectly bar, so it has, in the Makefile, LDADD = foo. In this case, if i don't also…
Cumatru
  • 695
  • 2
  • 12
  • 34
0
votes
1 answer

AutoMake - Source file used in more than one binary

Attention AutoMake experts... ;) What is the "proper" way of using certain source files in multiple binaries? I have a client and a server, and there are some "shared" source files (parse.c/parse.h and message.c/message.h). And of course I have to…
BenjiWiebe
  • 2,116
  • 5
  • 22
  • 41
0
votes
1 answer

Automake: How to use a header from one library in a another library in a sister directory

My directory set up: libone one.c one.h Makefile.am libtwo two.c #includes one.h two.h Makefile.am ... Makefile.am configure.ac ... Now when I do autoreconf -fvi and configure and make, I get the error from two.c: could not find…
BenjiWiebe
  • 2,116
  • 5
  • 22
  • 41
0
votes
1 answer

Libtool Discards Static Library When Building Shared Library

I am trying to build a shared object for gstreamer. I have a static library that I need to link into it. I have tried many things, but no matter what libtool discards my shared library. I tried: -Wl,--whole-archive…
Constantin
  • 16,812
  • 9
  • 34
  • 52
0
votes
1 answer

Can Automake include multiple Makefile.am together?

I have a set of different projects that all share a common set of C++ libraries. Currently these common libs are copied into each code base but this is turning into a major problem for me. We use subversion for version control so I am planning on…
chotchki
  • 4,258
  • 5
  • 34
  • 55
0
votes
1 answer

add in a Makefile.in a -DVARIABLE linux

I am trying to make a configure.ac + Makefile.in files I have. Everything is ok till at make: Here I have: usr/bin/ld: /usr/lib/debug/usr/lib/x86_64-linux-gnu/crt1.o(.debug_info): relocation 9 has invalid symbol index 2 /usr/bin/ld:…
just ME
  • 1,817
  • 6
  • 32
  • 53
0
votes
1 answer

Using autotools build system / Building in a separate 'build' directory

I'm creating a software project and I wanted to use autotools to do the makefile and etc. script generation for me, I manually created Makefile.am and configure.in files, and I'm using the autogen.sh script from here. The problem comes when…
Adam M-W
  • 3,509
  • 9
  • 49
  • 69
0
votes
2 answers

Specifying Exact Library to Link with In Automake

I am having extreme trouble cross compiling a project related to gstreamer. I am trying to link it to a library on my cross compile machine's /usr/lib If I do the standard linker flags -L{FILESYS_DIR}/usr/lib -lGLESv2 I get pthread complaints from…
Constantin
  • 16,812
  • 9
  • 34
  • 52