-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
69 lines (45 loc) · 2.27 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Default compiler options
CC = gcc -Wall -Wno-unused-result -g -O3 -pthread
# Mandelbrot flags
CFLAGS = -Wall -O2 -ffast-math `pkg-config --cflags gtk+-3.0`
LDLIBS = `pkg-config --libs gtk+-3.0`
.PHONY: clean
all: quicksort_ws quicksort_lifo quicksort_lifo_cond quicksort_naive knapsack_ws knapsack_lifo knapsack_lifo_cond knapsack_naive benchmark
quicksort: quicksort_ws quicksort_lifo quicksort_lifo_cond quicksort_naive
knapsack: knapsack_ws knapsack_lifo knapsack_lifo_cond knapsack_naive
mandelbrot: mandelbrot_ws mandelbrot_lifo mandelbrot_lifo_cond mandelbrot_naive
# QUICKSORT
quicksort_ws: src/quicksort.c src/work_stealing.c src/sched.h
$(CC) -o quicksort_ws src/quicksort.c src/work_stealing.c
quicksort_lifo: src/quicksort.c src/lifo.c src/sched.h
$(CC) -o quicksort_lifo src/quicksort.c src/lifo.c
quicksort_lifo_cond: src/quicksort.c src/lifo_cond.c src/sched.h
$(CC) -o quicksort_lifo_cond src/quicksort.c src/lifo_cond.c
quicksort_naive: tests/quicksort_naive.c
$(CC) -o quicksort_naive tests/quicksort_naive.c
# KNAPSACK
knapsack_ws: src/knapsack.c src/work_stealing.c src/sched.h
$(CC) -o knapsack_ws src/knapsack.c src/work_stealing.c
knapsack_lifo: src/knapsack.c src/lifo.c src/sched.h
$(CC) -o knapsack_lifo src/knapsack.c src/lifo.c
knapsack_lifo_cond: src/knapsack.c src/lifo_cond.c src/sched.h
$(CC) -o knapsack_lifo_cond src/knapsack.c src/lifo_cond.c
knapsack_naive: tests/knapsack_naive.c
$(CC) -o knapsack_naive tests/knapsack_naive.c
# MANDELBROT
mandelbrot_ws: src/work_stealing.c src/mandelbrot.c
$(CC) -o mandelbrot_ws src/mandelbrot.c src/work_stealing.c $(CFLAGS) $(LDLIBS)
mandelbrot_lifo: src/lifo.c src/mandelbrot.c
$(CC) -o mandelbrot_lifo src/mandelbrot.c src/lifo.c $(CFLAGS) $(LDLIBS)
mandelbrot_lifo_cond: src/lifo_cond.c src/mandelbrot.c
$(CC) -o mandelbrot_lifo_cond src/mandelbrot.c src/lifo_cond.c $(CFLAGS) $(LDLIBS)
mandelbrot_naive: tests/naive_mandelbrot.c
$(CC) -o mandelbrot_naive tests/naive_mandelbrot.c $(CFLAGS) $(LDLIBS)
# BENCHMARK
benchmark: src/benchmark.c
$(CC) -o benchmark src/benchmark.c
clean:
rm -f quicksort_ws quicksort_lifo quicksort_lifo_cond quicksort_naive \
knapsack_ws knapsack_lifo knapsack_lifo_cond knapsack_naive \
mandelbrot_naive mandelbrot_lifo mandelbrot_lifo_cond mandelbrot_ws \
benchmark *.o