On Sat, 2010-11-20 at 10:36 -0500, MK wrote: > Ah, it's because of GNU make: > > "By default, the Make rules should compile and link with -g, so that > executable programs have debugging symbols. Users who don't mind being > helpless can strip the executables later if they wish." > > Nice, flexible software it ain't.
That's a recommendation about the GNU standard way to create makefiles. It's in a chapter called "Makefile Conventions" and the introductory sentence, which is just a paragraph or two above the section quoted above, says "All *GNU* programs *should* have the following targets in their Makefiles" (emphasis added). This chapter has no relationship to any default BUILT INTO or REQUIRED by GNU make; in fact there IS NO default value for CFLAGS built into GNU make: ~$ env -i make -pf/dev/null | grep -- -g # This program built for x86_64-pc-linux-gnu make: *** No targets. Stop. ~$ env -i make -pf/dev/null | grep CFLAGS make: *** No targets. Stop. LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c Of course you can do what you like, but I should point out that the recommendations from the GNU people are the best practices resulting from decades of producing and using free software products. If I were you I'd take advantage of that experience. -- ------------------------------------------------------------------------------- Paul D. Smith <psm...@gnu.org> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist