Is there any way to make a dependent library implicitly use any compiler flags used by a library on which it depends? I'm running into two problems that this would solve.
The first is illustrated by these Makefile.amS: # libfoo AM_CPPFLAGS = -I/some/include_path lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.cpp libegfconfig_la_LIBADD = -lxml2 # libbar AM_CPPFLAGS = -I/some/include_path # I want this to happen implicitly lib_LTLIBRARIES = libbar.la libbar_la_SOURCES = bar.cpp libbar_la_LIBADD = $(top_builddir)/some/path/libfoo.la The second file has to specify the additional include path because bar.cpp includes foo.hpp which includes something from /some/include_path. I would like this to happen implicitly based on the fact that libbar depends on libfoo. I also have a similar problem with the -mcx16 compiler option. I currently have to specify it manually for all dependent libraries, but would like the flag to be specified implicitly. Thanks for any help. - Daniel