0
1
I have a huge Makefile I'm working with and trying to trim down. Right now, it's layed out to build several different programs with tons of options I'll never use. My hope is to first make sure the code builds the right way, and then cut out parts I don't need.
First things first, I want to make sure my code in compiling with -o3 (lots of optimizations) but I'm not sure that it is. I see a chunk of the Makefile that says:
ifeq ($(findstring $(CFLAGS),-O),)
CFLAGS_COMMON += -O3
# only add -O3 if no -O flag is in $(CFLAGS)
endif
which provides some solace...but doesn't there have to be a -O flag in place for it to compile at all, negating the if-statement?
Here's the whole Makefile: http://textuploader.com/bj98
!) That option uses a capitalized 'O'. 2) See http://stackoverflow.com/questions/5820303/how-do-i-force-make-gcc-to-show-me-the-commands and verbose mode in http://elinux.org/Debugging_Makefiles
– sawdust – 2015-06-29T03:15:47.743