-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
31 lines (24 loc) · 1.09 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FLAGS = -g -c -Wall -Iinclude
COMPILED = bin
trab3: src/main.c include/core.h include/list.h include/rbtree.h include/tst.h include/vertex.h include/util.h
@mkdir -p $(COMPILED)
@gcc $(FLAGS) src/main.c -o $(COMPILED)/main.o
@gcc $(FLAGS) src/core.c -o $(COMPILED)/core.o
@gcc $(FLAGS) src/rbtree.c -o $(COMPILED)/rbtree.o
@gcc $(FLAGS) src/tst.c -o $(COMPILED)/tst.o
@gcc $(FLAGS) src/list.c -o $(COMPILED)/list.o
@gcc $(FLAGS) src/vertex.c -o $(COMPILED)/vertex.o
@gcc $(FLAGS) src/util.c -o $(COMPILED)/util.o
@gcc -Iinclude -o trab3 $(COMPILED)/main.o $(COMPILED)/core.o $(COMPILED)/rbtree.o $(COMPILED)/tst.o $(COMPILED)/list.o $(COMPILED)/vertex.o $(COMPILED)/util.o -lm
clean:
@rm -f $(COMPILED)/*.o
@rm -rf $(COMPILED)
@rm -f trab3
run: trab3
@./trab3 inputs/sample1 < inputs/sample1/searches.txt
runpdf: trab3
@./trab3 inputs/pdf < inputs/pdf/searches.txt
valgrind: trab3
@valgrind --leak-check=full --show-leak-kinds=all ./trab3 inputs/sample1 < inputs/sample1/searches.txt
valgrindpdf: trab3
@valgrind --leak-check=full --show-leak-kinds=all ./trab3 inputs/pdf < inputs/pdf/searches.txt