## ## PIN tools ## ############################################################## # # Here are some things you might want to configure # ############################################################## #TARGET_COMPILER?=ms TARGET_COMPILER?=gnu ############################################################## # # include *.config files # ############################################################## ifeq ($(TARGET_COMPILER),gnu) include ../makefile.gnu.config LINKER?=${CXX} CXXFLAGS ?= -I$(PIN_HOME)/InstLib -fomit-frame-pointer -Wall -Werror -Wno-unknown-pragmas $(DBG) $(OPT) -MMD endif ifeq ($(TARGET_COMPILER),ms) DEBUG?=1 include ../makefile.ms.config endif ############################################################## # # build rules # ############################################################## APPS = marker-example TOOL_ROOTS = mix TESTS = mix TOOLS = $(TOOL_ROOTS:%=%$(PINTOOL_SUFFIX)) all: $(APPS) $(TOOLS) tools: $(TOOLS) test: $(TESTS:=.test) ## build rules %.o : %.cpp $(CXX) -c $(CXXFLAGS) $(PIN_CXXFLAGS) ${OUTOPT}$@ $< $(TOOLS): $(PIN_LIBNAMES) $(TOOLS): %$(PINTOOL_SUFFIX) : %.o ${LINKER} $(PIN_LDFLAGS) $(LINK_DEBUG) ${LINK_OUT}$@ $< ${PIN_LPATHS} $(PIN_LIBS) $(DBG) marker-example: marker-example.cpp ${CXX} $(NO_LOGO) $(APP_CXXFLAGS2) ${OUTOPT}$@ $< $(APP_CXXLINK_FLAGS) mix.test: mix.tested mix.failed mix$(PINTOOL_SUFFIX) marker-example $(PIN) -t ./$(@:.test=) -category -start_address marker_start_counting:repeat -stop_address marker_stop_counting:repeat -zero_stats_address marker_zero_stats:repeat -emit_stats_address marker_emit_stats:repeat -- ./marker-example rm $(@:.test=.failed) ## cleaning clean: -rm -f *.o $(TOOLS) *.out *.tested *.failed *.d marker-example *.obj *.exe *.lib *.exp *.pdb -include *.d