diff --git a/.vscode/settings.json b/.vscode/settings.json index ac3c01a..78dd7ab 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,8 +20,8 @@ "--header-insertion=never", "-log=info" ], - "C_Cpp.autocomplete": "disabled", - "C_Cpp.codeFolding": "disabled", - "C_Cpp.configurationWarnings": "disabled", - "C_Cpp.intelliSenseEngine": "disabled" + // "C_Cpp.autocomplete": "disabled", + // "C_Cpp.codeFolding": "disabled", + // "C_Cpp.configurationWarnings": "disabled", + // "C_Cpp.intelliSenseEngine": "disabled" } \ No newline at end of file diff --git a/Makefile b/Makefile index ec876d7..de77860 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ PROG = helloworld HPTEST = hptest UDIR = $(PWD)/source/uapi -MDIR := $(PWD)/source/module -KDIR := $(PWD)/linux-5.17.15 # 内核源码目录 +MDIR := $(PWD)/source +KDIR := /usr/src/kernels/5.17.15-1.el8.x86_64/ # 内核源码目录 TDIR := $(PWD)/testcase BUILD_DIR := $(PWD)/build @@ -20,9 +20,11 @@ OUTPUT_DIR = $(PWD)/build all: $(PROG) $(HPTEST) module $(PROG): $(TDIR)/helloworld.c + mkdir -p $(OUTPUT_DIR) $(CC) $(CFLAGS) -o $(OUTPUT_DIR)/$(PROG) $(TDIR)/helloworld.c $(UDIR)/monitor_user.c $(HPTEST): $(TDIR)/helloworld.c + mkdir -p $(OUTPUT_DIR) $(CC) $(CFLAGS) -o $(OUTPUT_DIR)/$(HPTEST) $(TDIR)/hptest.c $(UDIR)/monitor_user.c module: diff --git a/source/Makefile b/source/Makefile index 27f0ffc..6fa45b4 100644 --- a/source/Makefile +++ b/source/Makefile @@ -11,8 +11,11 @@ variable_monitor-objs := module/monitor_kernel.o \ ccflags-y += -Wno-declaration-after-statement -PWD := $(shell pwd) -KDIR := /home/zy/Git/variable_monitor/linux-5.17.15 +# PWD := $(shell pwd) +# KDIR := /usr/src/kernels/5.17.15-1.el8.x86_64/ -default: - $(MAKE) -C $(KDIR) M=$(PWD) modules \ No newline at end of file +# default: +# $(MAKE) -C $(KDIR) M=$(PWD) modules + +# clean: +# $(MAKE) -C $(KDIR) M=$(PWD) modules \ No newline at end of file