-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (46 loc) · 989 Bytes
/
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
TARGET_MODULE := sort_test
obj-m :=$(TARGET_MODULE).o
sort_test-objs := \
listsort.o \
xoroshiro128p.o \
sort_test_impl.o \
sort_test_kernel.o \
timsort_merge.o \
timsort_linear.o \
timsort_binary.o \
timsort_b_gallop.o \
timsort_l_gallop.o \
shiverssort.o \
shiverssort_merge.o \
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
all: client
$(MAKE) -C $(KDIR) M=$(PWD) modules
client: client.c
gcc client.c -o client -lm
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
$(RM) client out
load:
sudo insmod $(TARGET_MODULE).ko
unload:
sudo rmmod $(TARGET_MODULE) || true >/dev/null
plot:
sudo gnuplot sort_test_comparisons.gp
sudo gnuplot sort_test_durations.gp
sudo gnuplot sort_test_kvalue.gp
check: all
$(MAKE) unload
$(MAKE) load
sudo ./client single 20000
$(MAKE) unload
multiple: all
$(MAKE) unload
$(MAKE) load
sudo ./client continuous
$(MAKE) unload
single: all
$(MAKE) unload
$(MAKE) load
sudo ./client single 20000
$(MAKE) unload