How to write Makefile of kernel module by Centos

now you need to write a Linux kernel program. I don"t know how to write the Makefile file. The
code directory structure is as follows

-
-src/
    -conf/
        -log.conf          // log.c
    -demo.c                // log.h,
    -log.c                 // log.h,
-header/
    -log.h

question
how to write Makefile file to generate xx.ko kernel module file

status
Makefile written by oneself looks like this, as shown in the following file

ifneq ($(KERNELRELEASE),)
    XXXXXXXXXXXXXX

else      
    KDIR := /lib/modules/$(shell uname -r)/build
    PWD:= $(shell pwd)

all:   
    make -C $(KDIR) M=$(PWD) modules

clean:
    rm -f *.ko *.o *.mod.o *.mod.c *.symvers

endif  

what I want to ask is how to write the code in the XXXXXXXXXXXXXX area so that it compiles successfully

Mar.10,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35758-2bf7a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35758-2bf7a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?