mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
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: https://origsvn.digium.com/svn/asterisk/trunk@32434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
39
Makefile
39
Makefile
@@ -37,22 +37,6 @@ PWD=$(shell pwd)
|
|||||||
# Remember the MAKELEVEL at the top
|
# Remember the MAKELEVEL at the top
|
||||||
MAKETOPLEVEL?=$(MAKELEVEL)
|
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"
|
# Overwite config files on "make samples"
|
||||||
OVERWRITE=y
|
OVERWRITE=y
|
||||||
|
|
||||||
@@ -147,6 +131,29 @@ TOPDIR_CFLAGS=-include include/autoconfig.h -Iinclude
|
|||||||
MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
|
MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
|
||||||
OTHER_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 allocations [filename]
|
||||||
# *CLI> show memory summary [filename]
|
# *CLI> show memory summary [filename]
|
||||||
ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
|
ifneq ($(findstring MALLOC_DEBUG,$(MENUSELECT_CFLAGS)),)
|
||||||
|
@@ -7,6 +7,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="DETECT_DEADLOCKS" displayname="Detect Deadlocks">
|
<member name="DETECT_DEADLOCKS" displayname="Detect Deadlocks">
|
||||||
</member>
|
</member>
|
||||||
|
<member name="DONT_OPTIMIZE" displayname="Disable Optimizations from the Compiler">
|
||||||
|
</member>
|
||||||
<member name="DUMP_SCHEDULER" displayname="Dump Scheduler Contents for Debugging">
|
<member name="DUMP_SCHEDULER" displayname="Dump Scheduler Contents for Debugging">
|
||||||
</member>
|
</member>
|
||||||
<member name="LOW_MEMORY" displayname="Optimize for Low Memory Usage">
|
<member name="LOW_MEMORY" displayname="Optimize for Low Memory Usage">
|
||||||
|
Reference in New Issue
Block a user