ipt-netflow icon indicating copy to clipboard operation
ipt-netflow copied to clipboard

Cannot pass CFLAGS and LDFLAGS

Open xaionaro opened this issue 10 years ago • 3 comments

How to add custom CFLAGS and LDFLAGS? I was have to use sed [...] -i Makefile in file debian/rules of Debian package to make that.

xaionaro avatar Nov 30 '14 10:11 xaionaro

Can you elaborate? I don't know how debian packaging work and why it's required to pass anything, and where it pass what.

Basically, do you want to pass CFLAGS to configure or to make? (To which build target? And what flags?)

aabc avatar Nov 30 '14 20:11 aabc

Just FYI - we are using these sed statements in Gentoo ebuild:

    sed -i \
            -e 's:make -C:$(MAKE) -C:g' \
            -e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \
            -e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \
            Makefile.in || die

If CFLAGS and LDFLAGS variables are not defined - they will be empty - thus - no harm. If CC variable is not defined, make defines it as CC="cc". cc binary is usually exists in generic gcc installations, so - no harm too.

Pinkbyte avatar Jan 06 '15 01:01 Pinkbyte

@Pinkbyte Thanks.

aabc avatar Jan 06 '15 15:01 aabc