blob: ecfd971e21bf2c25ee7f3297a7f4b60e40c301a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 $@
|