-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 801 Bytes
/
Makefile
File metadata and controls
39 lines (32 loc) · 801 Bytes
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
31
32
33
34
35
36
37
38
39
CC=gcc
FLAGS= -o3 -std=c99 -D_POSIX_SOURCE -D_GNU_SOURCE -fsplit-stack -g
LIST=list.c divide.c merge.c
TRG=main
build:
@$(CC) main.c $(LIST) $(FLAGS) -o $(TRG)
build_example:
@$(CC) example.c $(LIST) $(FLAGS) -o example
run: build
@./$(TRG)
@gnuplot ./scripts/plot.gp
example: build_example
@./example
clean:
@rm -rf main example interval head_tail perf.* *.png *.txt ./data/*.txt ./plots/*.png
plot:
gnuplot ./scripts/plot.gp
interval:
@$(CC) interval.c $(LIST) $(FLAGS) -o interval
perf stat ./interval
head_tail:
@$(CC) interval.c $(LIST) $(FLAGS) -o head_tail
perf stat ./head_tail
recursive:
@$(CC) recursive.c $(LIST) $(FLAGS) -o recursive
perf stat ./recursive
addr:
@$(CC) addr.c $(LIST) $(FLAGS) -o addr
@./addr
@rm -rf addr
@gnuplot addr.gp
@gnuplot rand_addr.gp