compilation - Is it possible to set the compiling and linking flags in Makefile.am instead of configure.ac? -
is possibleto set such flags in makefile.am instead? solve problem asked @ https://stackoverflow.com/questions/22617744/how-to-disable-the-runtime-checking-of-dynamic-libraries-if-they-are-not-used.
if using autoconf , automake, should able pass in linker flags @ compile time make using following:
make ldflags='-l/my/nonstandard/prefix/lib' target
additionally, can cc, cflags, cpp, cppflags, , libs. example:
make cc=gcc-4.2 \ libs='-lmylibrary -lhislib ../lib/libcustom.a' \ ldflags='-l/opt/vend/lib' \ cppflags='-i../include' \ cflags='-wall' \ target
if want make them permanent in make file, add them automake variables:
am_libs = -lmylibrary -lhislib ../lib/libcustom.a am_ldflags = -l/opt/vend/lib am_cppflags = -i../include am_cflags = -wall
using above variables, still allow add flags passing them make using previous method.
Comments
Post a Comment