summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2010-04-08 06:10:18 +0000
committer Aaron Giles <aaron@aarongiles.com>2010-04-08 06:10:18 +0000
commit717a11337e363de3fa75af8f7a4daee1d438fb65 (patch)
tree94d5764c9c3462e9a4ada281f19ef0fafd186b84 /makefile
parent2238e2d3ea0f05362f8b288daa1fe3a5c4150fe1 (diff)
Added gprof support to the makefile. [Bryan Ischo]
Added a check for the OPTION_READCONFIG option before executing the code which would attempt to incorporate configuration file settings into the current configuration, because if OPTION_READCONFIG is set to false, then there is no reason to even try to do this as every single configuration file will be ignored (because config files have been turned off by OPTION_READCONFIG). [Bryan Ischo] Fixed small memory leak in mame.c. [Bryan Ischo] Fixed double-free error in render.c. [Bryan Ischo] Made core_strdup use osd_malloc instead of malloc. [Bryan Ischo]
Diffstat (limited to 'makefile')
-rw-r--r--makefile17
1 files changed, 16 insertions, 1 deletions
diff --git a/makefile b/makefile
index 4af5a4c03e0..15367e3cd6b 100644
--- a/makefile
+++ b/makefile
@@ -177,6 +177,9 @@ endif
# uncomment next line to include the internal profiler
# PROFILER = 1
+# uncomment next line to include gprof profiler support
+# GPROF = 1
+
# uncomment the force the universal DRC to always use the C backend
# you may need to do this if your target architecture does not have
# a native backend
@@ -247,6 +250,12 @@ PROFILER = 1
endif
endif
+# allow gprof profiling as well, which overrides the internal PROFILER
+ifdef GPROF
+CCOMFLAGS += -pg
+PROFILER =
+# LIBS += -lc_p
+endif
#-------------------------------------------------
@@ -284,6 +293,7 @@ RM = @rm -f
PREFIXSDL =
SUFFIX64 =
SUFFIXDEBUG =
+SUFFIXGPROF =
# Windows SDL builds get an SDL prefix
ifeq ($(OSD),sdl)
@@ -302,6 +312,11 @@ ifdef DEBUG
SUFFIXDEBUG = d
endif
+# gprof builds get an addition 'p' suffix
+ifdef GPROF
+SUFFIXGPROF = p
+endif
+
# the name is just 'target' if no subtarget; otherwise it is
# the concatenation of the two (e.g., mametiny)
ifeq ($(TARGET),$(SUBTARGET))
@@ -311,7 +326,7 @@ NAME = $(TARGET)$(SUBTARGET)
endif
# fullname is prefix+name+suffix+suffix64+suffixdebug
-FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)
+FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)$(SUFFIXGPROF)
# add an EXE suffix to get the final emulator name
EMULATOR = $(FULLNAME)$(EXE)