Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Compiler and flags
- CC = gcc
- CFLAGS = -g -O2 -Wall -I/usr/include/lua5.4
- LDFLAGS = -llua5.4
- # Source files
- SRCS = fullgc.c incrementalgc.c generationalgc.c
- # convert dot files to png
- pngs: dotfiles
- dot -Tpng fullgc.dot -o fullgc.png
- dot -Tpng incrementalgc.dot -o incrementalgc.png
- dot -Tpng generationalgc.dot -o generationalgc.png
- # convert callgrind output to dotfile
- dotfiles: callgrind
- . env/bin/activate
- gprof2dot -f callgrind fullgc.txt -o fullgc.dot
- gprof2dot -f callgrind incrementalgc.txt -o incrementalgc.dot
- gprof2dot -f callgrind generationalgc.txt -o generationalgc.dot
- # Run each executable
- callgrind: fullgc incrementalgc generationalgc
- valgrind --tool=callgrind --callgrind-out-file=fullgc.txt ./fullgc
- valgrind --tool=callgrind --callgrind-out-file=incrementalgc.txt ./incrementalgc
- valgrind --tool=callgrind --callgrind-out-file=generationalgc.txt ./generationalgc
- clear
- # Compile each source file into an executable
- fullgc: fullgc.c
- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
- clear
- incrementalgc: incrementalgc.c
- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
- clear
- generationalgc: generationalgc.c
- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
- clear
- # Clean up
- clean:
- rm -f fullgc incrementalgc generationalgc *.dot *.txt
- clear
- .PHONY: all clean callgrind
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement