linuxkm: fix clean rules/definitions to not pick up top level Makefile, and to clean up empty object directories.

This commit is contained in:
Daniel Pouzzner 2021-09-30 00:53:58 -05:00
parent 8e131620ae
commit 3745b1c9db
2 changed files with 4 additions and 2 deletions

View File

@ -172,4 +172,4 @@ $(src)/linuxkm/module_exports.c: $(src)/linuxkm/module_exports.c.template $(WOLF
}' >> $@
@echo -e '#ifndef NO_CRYPT_TEST\nEXPORT_SYMBOL_NS(wolfcrypt_test, WOLFSSL);\n#endif' >> $@
clean-files := module_exports.c
clean-files := module_exports.c linuxkm src wolfcrypt/src wolfcrypt/test wolfcrypt

View File

@ -103,8 +103,10 @@ install modules_install:
+$(MAKE) -C $(KERNEL_ROOT) M=$(MODULE_TOP) src=$(SRC_TOP) INSTALL_MOD_DIR=wolfssl modules_install
.PHONY: clean
# note, must supply $(MODULE_TOP) as the src value for clean so that Kbuild is included, else
# the top Makefile (which is not for the kernel build) would be included here.
clean:
+$(MAKE) -C $(KERNEL_ROOT) M=$(MODULE_TOP) src=$(SRC_TOP) clean
+$(MAKE) -C $(KERNEL_ROOT) M=$(MODULE_TOP) src=$(MODULE_TOP) clean
.PHONY: dist
dist: