mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
AM_CFLAGS is passed both to the compiler (.c -> .o) and to the linker, so it should only have flags that are appropriate for both steps. AM_CPPFLAGS is passed only to the compiler, so flags that are only appropriate for that step (-I and -D flags, for example), should be in _CPPFLAGS instead of _CFLAGS. Every gnucash-2.2.3 Makefile.am that passes -I flags gets it wrong, placing them in _CFLAGS. It's not a functional bug (the linker ignores -I flags), but a ton of superfluous flags makes the build output pretty verbose and hard to debug when things do go wrong. To make matters more confusing as a developer, the FOO_CFLAGS variable set by PKG_CHECK_MODULES(FOO) is actually for _CPPFLAGS in the Makefile.am ('pkg-config --cflags' returns the -I flags). A related -I bug (one that *is* functionally broken) is that sometimes a local (build dir) -I flag is passed after a global (installed dependent library) one. If my system happens to have a header installed from some unrelated thing, compiler will find *that* one instead of the expected one in the source directory. Should always pass all local -I before any global ones. Patch by andi5 plus one manual addition in src/gnome-utils/Makefile.am git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17655 57a11ea4-9604-0410-9ed3-97b8803252fd
14 lines
259 B
Makefile
14 lines
259 B
Makefile
noinst_LTLIBRARIES = libgnc-stf.la
|
|
|
|
REALSRCS = stf-parse.c
|
|
REALHDRS = stf-parse.h
|
|
|
|
libgnc_stf_la_SOURCES = ${REALSRCS}
|
|
noinst_HEADERS = ${REALHDRS}
|
|
|
|
libgnc_stf_la_LIBADD = $(GOFFICE_LIBS)
|
|
|
|
AM_CPPFLAGS = $(GOFFICE_CFLAGS)
|
|
|
|
EXTRA_DIST = $(REALSRCS) $(REALHDRS)
|