Skip to content

Commit

Permalink
Added GCC Profile option in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 4, 2018
1 parent fbde550 commit a75aa6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ PROG = $(NAME)
all: $(PROG)

#DEBUG=1
#GCC_PROFILE=1
#GEN_PROFILE=1
#USE_PROFILE=1

Expand Down Expand Up @@ -140,6 +141,7 @@ guisan:
$(MAKE) -C src/guisan

#DEBUG=1
#GCC_PROFILE=1
#GEN_PROFILE=1
#USE_PROFILE=1

Expand Down Expand Up @@ -179,6 +181,11 @@ ASFLAGS += $(CPU_FLAGS)

CXXFLAGS += $(SDL_CFLAGS) $(CPU_FLAGS) $(DEFS) $(MORE_CFLAGS)

ifdef GCC_PROFILE
MORE_CFLAGS += -pg
LDFLAGS += -pg
endif

ifdef GEN_PROFILE
MORE_CFLAGS += -fprofile-generate=$(PROFILER_PATH) -fprofile-arcs -fvpt
endif
Expand Down

0 comments on commit a75aa6b

Please sign in to comment.