during the debian packaging of externals i once more stumbled across one
of my many problems with make, which i was never able to solve in a
satisfactory way.
it is:
the Makefile uses CFLAGS and LDFLAGS to set crucial flags to the build
process e.g. LDFLAGS uses "-Wl,--export-dynamic -shared" to build shared
libraries (in our case: externals)
however, some meta build processes (like debian packaging) explicitely
set these FLAGS to what they think are good optimization/debugging defaults
e.g. make get's called like
$ /usr/bin/make LDFLAGS="" CFLAGS="-I/usr/local/include"
this however effectively disables all the settings done within the
Makefile, which leads to not passing "-Wl,--export-dynamic -shared" to
the linker, leading to a fatal error when linking.
what is the canonical way to use the passed FLAGS and at the same time
adding whatever is needed?
something like 'PD_LDFLAGS="-Wl,--export-dynamic -shared $(LDFLAGS)"'
and then consequently using $(PD_LDFLAGS) in the linking stage?
this is such a fundamental thing that i'm sure there has to be an
elegant solution to this but i never came across one.
the PD_LDFLAGS seems a bit like a kludge to me.
fgmsdr
IOhannes