Kernel build system defines KBUILD_MODNAME automatically from each Makefile.
You can easily find below string from build command of each files of modules.
-D"KBUILD_MODNAME=KBUILD_STR(xxxxx)" ('xxxxx' is given module name)
This name xxxxx comes from Makefile.
Below is simple example.
[ in Makefile ] xxxxx-y := a.o b.o c.o d.o
In above case, KBUILD_MODNAME of a.c, b.c, c.c and d.c becomes xxxxx.
This can be easily confirmed by checking command line of each objects – a.o, b.o, c.o and d.o.