diff options
Diffstat (limited to 'make/pgopt.make')
-rw-r--r-- | make/pgopt.make | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/make/pgopt.make b/make/pgopt.make new file mode 100644 index 0000000..ecfd971 --- /dev/null +++ b/make/pgopt.make @@ -0,0 +1,18 @@ +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 $@ |