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

Building targets separately

I have a project, that produces multiple binaries in bin/ directory. The project dir looks like this: bin/ app1/ app2/ app3/ Makefile.am configure.ac When I do make all, all the targets are compiled. But when I do e.g. make app1, it just says…
RobSis
  • 342
  • 2
  • 10
0
votes
1 answer

Conditional Compilation in C, when function has different prototypes using automake

ibv_modify_qp function has 2 different signatures for different version of the library. Both the libraries install the header files in same location. Below are the 2 versions. int ibv_modify_qp(struct ibv_qp *qp, struct ibv_qp_attr *attr, …
Hari
  • 93
  • 1
  • 3
0
votes
0 answers

Pre configuration before build, copying some files to directiory location using Automake

I am building my project using Automake. I have to copy few files before I start the build. What should I do in configure.ac file to copy few files to some directory location before I start building?
CVS
  • 491
  • 2
  • 4
  • 13
0
votes
2 answers

can not autoconf for cgminer (missing AC_CHECK_FUNCS)

I try to build cgminer for server from the source-code since it make by autoconfig and automake, I use autoscan try to scan it. but the problem is: missing AC_CHECK_FUNCS and other missing, what the source file or library I missed? may command in…
user504909
  • 9,119
  • 12
  • 60
  • 109
0
votes
1 answer

Default c++ project which is setup using autoconf

I know this is not a programming question so someone might close this but I am struggling hard in setting up a simple c++11 project using autoconf. I want a src and obj directory for source and object files. I also want a recursive directory…
rkb
  • 10,933
  • 22
  • 76
  • 103
0
votes
1 answer

automake: the ordering of compiler options hinders make

I am new to automake tools. In "src/Makefile.am", I use "AM_LDFLAGS = -L... -l...". Then, I run "autoreconf --force --install ; ./configure ; make" In the last command, $ g++ -O2 -L... -l... -o target_name [some *.o files] the compiler complains…
user180574
  • 5,681
  • 13
  • 53
  • 94
0
votes
1 answer

Autotools CFLAGS and LDFLAGS not working

I'm trying to compile a program using GNU Autotools. In my configure.ac I have the following line: PKG_CHECK_MODULES([DEPS], [cairo], [], [AC_MSG_ERROR([Missing Cairo library])]) My src/Makefile.am looks like this: bin_PROGRAMS = main main_SOURCES…
gsgx
  • 12,020
  • 25
  • 98
  • 149
0
votes
1 answer

Automake LIBADD not linking in

I'm attempting to add ZMQ to c_icap. This is my (which is modified from the stock makefile) Makefile.am: pkglib_LTLIBRARIES=srv_bluvector_icap.la INCLUDES = -I$(top_srcdir) srv_bluvector_icap_la_LIBADD = /usr/local/lib/libzmq.la …
user1357182
  • 59
  • 1
  • 2
  • 7
0
votes
1 answer

how to conditionally include a library

There is a project using protobuf as an option of serialization protocol, but not all the users have protobuf installed. The solution I'm using now is to use AC_CHECK_LIB[(protobuf)] in configure.ac, and if HAVE_PROTOBUF AM_LDFLAGS += -lprotobuf…
nzomkxia
  • 1,219
  • 4
  • 16
  • 35
0
votes
1 answer

how to make automake conditionally choose a src package?

under my project, I have 3 source code packages, say package1, package2, package3. one of them will be compiled according to a dependent software (e.g. softA) version. if I input './configure --softA-version=1.7.2', I hope that package3 will be…
jimmy.cao
  • 3
  • 1
0
votes
1 answer

How to link shared library via GNU Autotools

I'm trying to understand GNU Autools. My project compiles fine when I add -lxyz to the command line g++ .... xyz doesn't support pkg-config. What line do I need to add to Makefile.am? And to which Makefile.am do I add it - there is one for each…
SRobertJames
  • 8,210
  • 14
  • 60
  • 107
0
votes
1 answer

Using different version of gcc in my project using automake

I am using automake for my project. I have gcc 4.2 installed and there is a soft link to gcc-4.2 as gcc. I also installed gcc 4.8 at some other location and now I want my project to use gcc 4.8 from this location. I do not want to change the…
rkb
  • 10,933
  • 22
  • 76
  • 103
0
votes
2 answers

Use shell commands to find Makefile.am in configure.ac

I'm trying to add some shell commands to automatically search for Makefile.am in my project autoconf (so that I don't have to worry about forgetting to add an entry next time when there's a new Makefile.am). But it does not seem to work. I've tried…
Steven Lai
  • 138
  • 1
  • 9
0
votes
0 answers

Autoconf How To Include Data

I am creating a spellcheck program that uses a dictionary called english.dict. I need this installed in $datadir (I am using autoconf and automake). I have tried doing it this way: CFLAGS = -m32 -Wall LDFLAGS = bin_PROGRAMS =…
Igor
  • 548
  • 3
  • 7
  • 24
0
votes
1 answer

Automake & Autoconf - Program Doesn't Recognize Static Library Just Built

I am developing a library called libspellcheck, and a program that uses it to check spelling called spellcheck. Here is my directory structure: libspellcheck -> doc -> man -> libspellcheck (libspellcheck source) ->…
Igor
  • 548
  • 3
  • 7
  • 24