diff --git a/Makefile.common b/Makefile.common index a5ee9c80f1c..20e2979b63b 100644 --- a/Makefile.common +++ b/Makefile.common @@ -131,6 +131,13 @@ else PROFILE = endif +# By default, strip symbol information from executable +ifdef KEEP_SYMBOLS +STRIP = +else +STRIP = -s +endif + # Allow gnu extensions... CPPFLAGS += -D_GNU_SOURCE @@ -149,7 +156,7 @@ Link := $(PURIFY) $(CXX) $(PROFILE) -static else Link := $(CXX) $(PROFILE) endif -LinkG := $(Link) -g -L $(LIBDEBUG) +LinkG := $(Link) -g -L $(LIBDEBUG) $(STRIP) LinkO := $(Link) -O3 -L $(LIBRELEASE) # Create one .o file from a bunch of .o files... diff --git a/Makefile.rules b/Makefile.rules index a5ee9c80f1c..20e2979b63b 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -131,6 +131,13 @@ else PROFILE = endif +# By default, strip symbol information from executable +ifdef KEEP_SYMBOLS +STRIP = +else +STRIP = -s +endif + # Allow gnu extensions... CPPFLAGS += -D_GNU_SOURCE @@ -149,7 +156,7 @@ Link := $(PURIFY) $(CXX) $(PROFILE) -static else Link := $(CXX) $(PROFILE) endif -LinkG := $(Link) -g -L $(LIBDEBUG) +LinkG := $(Link) -g -L $(LIBDEBUG) $(STRIP) LinkO := $(Link) -O3 -L $(LIBRELEASE) # Create one .o file from a bunch of .o files...