> solidrun/Makefile: > obj-$(CONFIG_SNET_VDPA) += snet_vdpa.o > snet_vdpa-$(CONFIG_SNET_VDPA) += snet_main.o > #if IS_REACHABLE(CONFIG_HWMON) > snet_vdpa-$(CONFIG_SNET_VDPA) += snet_hwmon.o > #endif I meant here solidrun/Makefile: obj-$(CONFIG_SNET_VDPA) += snet_vdpa.o snet_vdpa-$(CONFIG_SNET_VDPA) += snet_main.o ifdef CONFIG_HWMON snet_vdpa-$(CONFIG_SNET_VDPA) += snet_hwmon.o endif And I'll use #ifdef CONFIG_HWMON in solidrun/snet_main.c and solidrun/snet_vdpa.h