[Slackbuilds-users] Modifying config.mk's CFLAGS variable

Brandon Pribula b.pribs11 at gmail.com
Sat Apr 23 04:53:20 UTC 2022


Hi,

I have a situation with an application I'm packaging. The CFLAGS variable,
et al in config.mk can't be prepended.

CFLAGS = -std=c99 ...

instead of

CFLAGS += -std=c99 ...

so as is I can't prepend $SLKFLAGS to $CFLAGS. It also contains an
optimization flag: -Os which conflicts with Slackware's.

The solution I came up with is to change '=' to '+='

sed -i '/CFLAGS/s/=/+=/' config.mk

and remove the optimization flag -Os

sed -i '/CFLAGS/s/-Os//' config.mk

This works fine but I would like to know if there is a more preferable
solution with a slackbuild.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20220422/bc201f82/attachment-0001.htm>


More information about the SlackBuilds-users mailing list