ifeq ($(PGOPT), 1) PGOPTS =-fprofile-dir=tmp/pgopt/profiles -fprofile-use # add dependency to all bins that should be profiled bin/simulate.dep: tmp/pgopt/run/simulate/.finish endif tmp/pgopt/bin/%: core/%.cpp properties/default/properties.hpp mkdir -p $(shell dirname $@) tmp/pgopt/profiles $(CC) $(CCOPTS) $(ERR) -fprofile-dir=$(shell pwd)/tmp/pgopt/profiles -fprofile-generate $< -I. -Iproperties/default -o $@ # HACK: put some additional programs here tmp/pgopt/run/%/.finish: tmp/pgopt/bin/% tmp/pgopt/run/%/.bootstrap tmp/pgopt/bin/spike_in tmp/pgopt/bin/spike_out cd $(shell dirname $@) && ../../../../$< 60.0 cd $(shell dirname $@) && ../../bin/spike_in 0 0 60 > /dev/null cd $(shell dirname $@) && ../../bin/spike_out 0 0 60 > /dev/null cd $(shell dirname $@) && rm * .bootstrap touch $@