####################################################################### # Author: David Goz (david.goz@inaf.it) # # June 2024 # ####################################################################### # # To see all the compilation options # $ make info ####################################################################### # make.def defines how the application is compiled include make.def ####################################################################### .PHONY: info serial valgrind_memcheck valgrind_callgrind valgrind_cachegrind debug clean info: @echo ' ' @echo '-----------------------------------------------------------------------------------------------' @echo '$$ make serial ---> compile the serial application ' @echo '$$ make debug ---> debug the serial application ' @echo '$$ make valgrind_memcheck ---> run the serial application using Valgrind under Memcheck ' @echo '$$ make valgrind_callgrind ---> run the serial application using Valgrind under Callgrind ' @echo '$$ make valgrind_cachegrind ---> run the serial application using Valgrind under Cachegrind ' @echo '$$ make clean ---> clean up all ' @echo '$$ make info ---> get make info ' @echo '-----------------------------------------------------------------------------------------------' @echo ' ' serial: $(PROG) debug: $(PROG_DEBUG) @echo 'OOOooo... debugging ...oooOOO' gdb --args ./$< @echo 'OOOooo... debugging ... oooOOO' valgrind_memcheck: $(PROG_MEMCHECK) @echo 'oooOOO... valgrind_memcheck ...OOOooo' valgrind --tool=memcheck -s --leak-check=full --show-leak-kinds=all --track-origins=yes --read-var-info=yes --log-file=valgrind_memcheck_log_%p.txt ./$< 10 10 @echo 'oooOOO... valgrind_memcheck ...OOOooo' valgrind_callgrind: $(PROG_CALLGRIND) @echo 'oooOOO... valgrind_callgrind ...OOOooo' valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes --log-file=valgrind_callgrind_log_.%p.txt ./$< 128 128 @echo ' ' @echo 'To generate a function-by-function summary from the profile data file:' @echo '$$ callgrind_annotate --auto=yes callgrind.out. | less' @echo '(kcachegrind is required in order to visualize the output using the GUI)' valgrind_cachegrind: $(PROG_CACHEGRIND) @echo 'oooOOO... valgrind_cachegrind ...OOOooo' valgrind --tool=cachegrind --cache-sim=yes --log-file=valgrind_cachegrind_log_.%p.txt ./$< 128 128 @echo '$$ cg_annotate --auto=yes cachegrind.out. | less' @echo '(kcachegrind is required in order to visualize the output using the GUI)' @echo 'oooOOO... valgrind_cachegrind ...OOOooo' clean: rm -f *~ .*~ ./src/*~ ./src/*# ./include/*~ ./include/*# *~ rm -f $(PROG) $(PROG_DEBUG) $(PROG_MEMCHECK) $(PROG_CALLGRIND) $(PROG_CACHEGRIND) rm -f valgrind_*.txt rm -f cachegrind.out.* rm -f callgrind.* rm -f *bin rm -f jacobi_serial_opt_*