- 论坛徽章:
- 17
|
include .c文件是比较不够标准的做法,一般也应该抵制。
不过万事不绝对,大家看看linux内核中同样也有include .c的时候:- #include <linux/kernel.h>
- #include <linux/utsname.h>
- #include "u_audio.h"
- #define DRIVER_DESC "Linux USB Audio Gadget"
- #define DRIVER_VERSION "Dec 18, 2008"
- /*-------------------------------------------------------------------------*/
- /*
- * Kbuild is not very cooperative with respect to linking separately
- * compiled library objects into one module. So for now we won't use
- * separate compilation ... ensuring init/exit sections work to shrink
- * the runtime footprint, and giving us at least some parts of what
- * a "gcc --combine ... part1.c part2.c part3.c ... " build would.
- */
- #include "composite.c"
- #include "usbstring.c"
- #include "config.c"
- #include "epautoconf.c"
- #include "u_audio.c"
- #include "f_audio.c"
复制代码 |
|