The compilation script for rtc_drv_s3c in the Makefile of the directory is:
Obj-$ (config_rtc_drv_s3c) + = RTC-S3C.O
The above script means that if the RTC_DRV_S3C configuration option is selected as "Y" or "M", that is obj-$ (config_rtc_
DRV_S3C) is equivalent to obj-y or obj-m, compile rtc-s3c.c and select "Y" to directly generate the target code
Directly connected to the kernel, the case of "M" generates a module Rtc-s3c.ko; If the rtc_drv_s3c configuration option is selected
RTC-S3C.C is not compiled for "N", that is, obj-$ (config_rtc_drv_s3c) is equivalent to Obj-n.
In general, the driver engineer will only add new device-driven sources to the appropriate subdirectory of the drivers directory of the kernel source code
Code, and add or modify the Kconfig configuration script and the Makefile script, just follow the above procedure
Linux Device Driver Development notes