Macos – .dSYM files generated from command line (Mac)

cdsymgccmacosmakefile

I just started coding in C, and ran someone else's Makefile with the default C compiler set to gcc. I am on Mac OSX 10.8 Mountain Lion and I believe I installed the compiler with "XCode Command Line Tools." After running "make" on command line, I get these annoying .dSYM files for each program. I read that these are debug files, but are they really necessary? Is there any way to prevent them from being generated from command line?

Best Answer

The -g flag to GCC will generate debug symbols. You may simply remove that flag from CFLAGS.