forked from sysprog21/fibdrv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (47 loc) · 1.18 KB
/
Makefile
File metadata and controls
58 lines (47 loc) · 1.18 KB
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
CONFIG_MODULE_SIG = n
TARGET_MODULE := fibdrv
obj-m := $(TARGET_MODULE).o
ccflags-y := -std=gnu99 -Wno-declaration-after-statement
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
GIT_HOOKS := .git/hooks/applied
all: $(GIT_HOOKS) client
$(MAKE) -C $(KDIR) M=$(PWD) modules
$(GIT_HOOKS):
@scripts/install-git-hooks
@echo
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:
gnuplot -p -c execution_time.gp
client: client.c
$(CC) -o $@ $^
PRINTF = env printf
PASS_COLOR = \e[32;01m
NO_COLOR = \e[0m
pass = $(PRINTF) "$(PASS_COLOR)$1 Passed [-]$(NO_COLOR)\n"
check: all
$(MAKE) unload
$(MAKE) load
sudo ./client > out
$(MAKE) unload
@diff -u out scripts/expected.txt && $(call pass)
@scripts/verify.py
profile: all
-rm -rf result/
mkdir -p result
number=1 ; while [ $$number -le 50 ] ; do \
$(MAKE) unload ; \
$(MAKE) load ; \
REPORT="result/test_$$number.txt" ; \
sudo taskset -c 1 chrt -f 90 ./client $$REPORT >/dev/null 2>&1 ; \
$(MAKE) unload ; \
number=`expr $$number + 1` ; \
done
scripts/outlier.py
gnuplot -p -c confidence_interval.gp