diff --git a/linuxkm/Kbuild b/linuxkm/Kbuild index f3043926c..4b20edb27 100644 --- a/linuxkm/Kbuild +++ b/linuxkm/Kbuild @@ -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 diff --git a/linuxkm/Makefile b/linuxkm/Makefile index 17e3131a9..4cc39bc01 100644 --- a/linuxkm/Makefile +++ b/linuxkm/Makefile @@ -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: