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

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

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

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

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

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

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