- $(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \
- $(filter-out FORCE,$^)
-
-.PHONY: __modpost
-__modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE
+ $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
+ $(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
+ $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
+ $(if $(KBUILD_EXTMOD)$(KBUILD_MODPOST_WARN),-w) \
+ $(wildcard vmlinux) $(filter-out FORCE,$^)
+
+PHONY += __modpost
+__modpost: $(modules:.ko=.o) FORCE