automake

Append compile flags to CFLAGS and CXXFLAGS while configuration/make

风格不统一 提交于 2019-11-27 00:53:06
问题 The project that I am trying to build has default flags CFLAGS = -Wall -g -O2 CXXFLAGS = -g -O2 I need to append a flag -w to both these variables (to remove: 'consider all warnings as errors') I have a method to work it out, give make 'CFLAGS=-Wall -g -O2 -w'; 'CXXFLAGS=-g -O2 -w' OR Run ./configure and statically modify Makefile But I want to append my options with the existing options while running configure or make The post Where to add a CFLAG, such as -std=gnu99, into an autotools

Autotools build fails due to subdir-objects option in AM_INIT_AUTOMAKE

谁说胖子不能爱 提交于 2019-11-26 21:53:33
问题 I'm currently working on a C++ project which relies on recursive automake for building. I want to build a shared library and the Makefile.am in the src directory of the library looks like # ... # Library name lib_LTLIBRARIES = libadapter-@MY_API_VERSION@.la # Sources libadapter_@MY_API_VERSION@_la_SOURCES = \ $(top_builddir)/src/sourceA.cpp \ $(top_builddir)/src/sourceB.cpp # ... Since version 1.14, automake issues a warning when the subdir-objects option is not specified in AM_INIT_AUTOMAKE

Build 32bit on 64 bit Linux using an automake configure script?

走远了吗. 提交于 2019-11-26 18:51:13
问题 I'm using a 64bit system but want a set of 32bit binaries. What options must I pass to a configure script to generate a 32bit/x86 makefile? 回答1: Passing the following argument to configure script allowed me to build the 32bit library on 64bit Linux ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32" 回答2: Jack's answer is incomplete. You need compiler/libc support for 32-bit compilation. In some distros like Ubuntu, what you need to do is install packages gcc

What are Makefile.am and Makefile.in?

偶尔善良 提交于 2019-11-26 18:41:57
问题 These two files are mostly seen in open source projects. What are they for, and how do they work? 回答1: Makefile.am is a programmer-defined file and is used by automake to generate the Makefile.in file (the .am stands for a uto m ake). The configure script typically seen in source tarballs will use the Makefile.in to generate a Makefile . The configure script itself is generated from a programmer-defined file named either configure.ac or configure.in (deprecated). I prefer .ac (for a uto c onf