4 Star 3 Fork 17

anolis/sysak-module

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 2.18 KB
一键复制 编辑 原始数据 按行查看 历史
ifeq ($(KERNEL_VERSION),)
KERNEL_VERSION = $(shell uname -r)
endif
KERNEL_BUILD_PATH := /usr/src/kernels/$(KERNEL_VERSION)
ifneq ($(KERNEL_BUILD_PATH), $(wildcard $(KERNEL_BUILD_PATH)))
KERNEL_BUILD_PATH := /lib/modules/$(KERNEL_VERSION)/build
endif
ifneq ($(KERNELRELEASE),)
#common
sysak-objs += ./common/chrdev.o ./common/event.o ./common/hook.o ./common/stack.o ./common/proc.o
sysak-objs += ./common/blackbox.o
sysak-objs += ./common/ksymbol.o
sysak-objs += ./entry.o sysak_mods.o
#modules
#sysak-objs += modules/test_module/test.o
ifneq ($(findstring tracesig,$(TARGET_LIST)),)
sysak-objs += modules/signal/trace_sig.o
endif
ifneq ($(findstring memleak,$(TARGET_LIST)),)
sysak-objs += modules/memleak/memleak.o
sysak-objs += modules/memleak/objects.o
sysak-objs += modules/memleak/hashlist.o
endif
ifneq ($(findstring runlatency,$(TARGET_LIST)),)
sysak-objs += modules/sched/noschedule.o modules/sched/trace_irqoff.o modules/sched/trace_runqlat.o
endif
ifneq ($(findstring taskctl,$(TARGET_LIST)),)
sysak-objs += modules/task_ctl/task_ctrl.o
endif
ifneq ($(findstring schedtrace,$(TARGET_LIST)),)
sysak-objs += modules/schedtrace/schedtrace.o
endif
ifneq ($(findstring mmaptrace,$(TARGET_LIST)),)
sysak-objs += modules/mmaptrace/mmaptrace.o
endif
ifneq ($(findstring ulockcheck,$(TARGET_LIST)),)
sysak-objs += modules/ulockcheck/ulockcheck.o
endif
ifneq ($(findstring iosdiag,$(TARGET_LIST)),)
sysak-objs += modules/iosdiag/iosdiag.o modules/iosdiag/rq_hang.o modules/iosdiag/virtio_blk.o modules/iosdiag/nvme.o modules/iosdiag/scsi.o
endif
ifneq ($(findstring memhunter,$(TARGET_LIST)),)
sysak-objs += modules/memhunter/memhunter.o
sysak-objs += modules/memhunter/common.o
sysak-objs += modules/memhunter/memcg.o
sysak-objs += modules/memhunter/memcg_dia.o
sysak-objs += modules/memhunter/filecache.o
endif
obj-m += sysak.o
EXTRA_CFLAGS := -I$(MODULE_SRC)
EXTRA_CFLAGS += -I$(MODULE_SRC)/include
ifneq ($(findstring iosdiag,$(TARGET_LIST)),)
EXTRA_CFLAGS += -I$(MODULE_SRC)/modules/iosdiag -I$(MODULE_SRC)/modules/iosdiag/include/$(KERNEL_VERSION)
endif
else
export MODULE_SRC=$(shell pwd)
sysak_mod:
make -C $(KERNEL_BUILD_PATH) M=$(MODULE_SRC)
clean:
make -C $(KERNEL_BUILD_PATH) M=$(MODULE_SRC) clean
endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/anolis/sysak-module.git
[email protected]:anolis/sysak-module.git
anolis
sysak-module
sysak-module
master

搜索帮助