Re: How to pass CFLAGS to upstream's Makefile with debhlepler ?
On 2011-11-14 06:12, Charles Plessy wrote:
> Dear all,
> trying to pass dpkg-buildglags' settings to an upstream build system
> (http://git.debian.org/?p=debian-med/bwa.git), I found no other way than
> patching their makefile, basically replacing
> CFLAGS = -g -Wall -O2
> CFLAGS ?= -g -Wall -O2
> I wonder if it was the right thing to do, and if it is a change that can be
> forwarded upstream.
> Also, I added $(CPPFLAGS) $(LDFLAGS) in some calls to $(CC), but I think I
> remember reading that $(LDFLAGS) is not needed everywhere. When in doubt, is
> it safe to add them ?
> Have a nice day,
I believe that:
dh_auto_build -- CFLAGS="$(CFLAGS)"
- OR -
ought to do. This only caveat is that it completely overrides the
CFLAGS variable in the makefile. This is usually mostly a problem if
upstream (ab)uses LDFLAGS to add "-llib" flags, which does not really