From 5998dbac5c395d3351c4656b7a759c69402c830d Mon Sep 17 00:00:00 2001 From: russell Date: Tue, 6 Jun 2006 00:25:23 +0000 Subject: add the ability to do the same thing as "make dont-optimize" by enabling the option in menuselect. This is very useful for developers if you want to ensure that all of your builds are done without optimizations. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32434 f38db490-d61c-443f-a65b-d21fe96a405b --- Makefile | 39 +++++++++++++++++++++++---------------- build_tools/cflags.xml | 2 ++ 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 4c0d6d6fe..92e1a2a17 100644 --- a/Makefile +++ b/Makefile @@ -37,22 +37,6 @@ PWD=$(shell pwd) # Remember the MAKELEVEL at the top MAKETOPLEVEL?=$(MAKELEVEL) -ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),) -# More GSM codec optimization -# Uncomment to enable MMXTM optimizations for x86 architecture CPU's -# which support MMX instructions. This should be newer pentiums, -# ppro's, etc, as well as the AMD K6 and K7. -#K6OPT = -DK6OPT - -# Tell gcc to optimize the code -OPTIMIZE+=-O6 -else - # Stack backtraces, while useful for debugging, are incompatible with optimizations - ifeq (${OSARCH},Linux) - CFLAGS+=-DSTACK_BACKTRACES - endif -endif - # Overwite config files on "make samples" OVERWRITE=y @@ -147,6 +131,29 @@ TOPDIR_CFLAGS=-include include/autoconfig.h -Iinclude MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I.. OTHER_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I.. +ifeq ($(findstring dont-optimize,$(MAKECMDGOALS)),) + ifeq ($(findstring DONT_OPTIMIZE,$(MENUSELECT_CFLAGS)),) +# More GSM codec optimization +# Uncomment to enable MMXTM optimizations for x86 architecture CPU's +# which support MMX instructions. This should be newer pentiums, +# ppro's, etc, as well as the AMD K6 and K7. +#K6OPT = -DK6OPT + +# Tell gcc to optimize the code +OPTIMIZE+=-O6 + else + # Stack backtraces, while useful for debugging, are incompatible with optimizations + ifeq (${OSARCH},Linux) + CFLAGS+=-DSTACK_BACKTRACES + endif + endif +else + # Stack backtraces, while useful for debugging, are incompatible with optimizations + ifeq (${OSARCH},Linux) + CFLAGS+=-DSTACK_BACKTRACES + endif +endif + # *CLI> show memory allocations [filename] # *CLI> show memory summary [filename] ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),) diff --git a/build_tools/cflags.xml b/build_tools/cflags.xml index 0b53a299e..dedc45814 100644 --- a/build_tools/cflags.xml +++ b/build_tools/cflags.xml @@ -7,6 +7,8 @@ + + -- cgit v1.2.3