I am creating a package that provides a lot of makefiles, each makefile is hard-coded aside, something like
CFLAGS = -g -O2 -Wall ... CXXFLAGS = -g -O2 -Wall ...
I want to abandon the -g option, but I do not want to edit all the makefiles (not even automatically using sed or something like that). configure script that comes with the package does not have the enable / disable debug option, but I can pass the CFLAGS and CXXFLAGS and combine their values โโwith the CFLAGS and CXXFLAGS respectively which include the -g option.
Is there an option that discards -g in case it is specified? Sort of
gcc -option-im-looking-for -g file.c -o file
Will build a binary file without debugging symbols. I do not want to split the binary, I want it to be created split.
source share