Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a make target for profiling

  • Loading branch information...
commit e1e81de7b8347bb079860a399fed31f985c5da38 1 parent aab7695
@shinh authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 Makefile
View
12 Makefile
@@ -1,4 +1,5 @@
-GCCFLAGS=-g -Iinclude -Wall -MMD -fno-omit-frame-pointer -O
+PROFILE_FLAGS=
+GCCFLAGS=-g -Iinclude -Wall -MMD -fno-omit-frame-pointer -O $(PROFILE_FLAGS)
CXXFLAGS=$(GCCFLAGS) -W -Werror
CFLAGS=$(GCCFLAGS) -fPIC
@@ -29,6 +30,9 @@ endif
all: $(EXES)
+profile:
+ make clean all PROFILE_FLAGS=-pg
+
mach: $(MAC_TARGETS)
check: all mach
@@ -48,13 +52,13 @@ $(MACTXTS): %.txt: %.bin
# touch $@
extract: extract.o fat.o
- $(CXX) $^ -o $@ -g -I. -W -Wall
+ $(CXX) $^ -o $@ -g -I. -W -Wall $(PROFILE_FLAGS)
macho2elf: macho2elf.o mach-o.o fat.o log.o
- $(CXX) $^ -o $@ -g
+ $(CXX) $^ -o $@ -g $(PROFILE_FLAGS)
ld-mac: ld-mac.o mach-o.o fat.o log.o
- $(CXX) $^ -o $@ -g -ldl -lpthread
+ $(CXX) $^ -o $@ -g -ldl -lpthread $(PROFILE_FLAGS)
# TODO(hamaji): autotoolize?
libmac/libmac.so: libmac/mac.o
Please sign in to comment.
Something went wrong with that request. Please try again.