computing-systems-212 / Lab 4: Optimizing Caches / task3 / Makefile
Makefile
Raw
LINE=64
L1=4096
L1A=4
LL=16384
LLA=8

task3: task3.o main.o
	cc -g -static -o $@ $^

task3.o: task3.c
	cc -g -c -O2 -o $@ $^

main.o: main.c
	cc -g -c -O2 -o $@ $^

.PHONY: run
run: task3
	valgrind -v --tool=cachegrind --D1=${L1},${L1A},${LINE} --LL=${LL},${LLA},${LINE} ./task3

.PHONY: detailed
detailed: task3
	valgrind -v --tool=cachegrind --D1=${L1},${L1A},${LINE} --LL=${LL},${LLA},${LINE} --cachegrind-out-file=stats.cgout ./task3
	cg_annotate --auto=yes --show-percs=no stats.cgout | tee stats.rep

.PHONY: clean
clean:
	rm -f *.o cachegrind.out.* *.cgout *.rep task3