文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>2.6下的内核模块编译

2.6下的内核模块编译

时间:2006-07-05  来源:strongzgy

1.一个模快中只有一个文件的编译
    Makefile如下:
    obj-m := hello.o
   运行时:make -C /lib/modules/`uname -r`/build M=`pwd`
2.一个模块中多个文件的编译
    Makefile如下:
     obj-m := hello.o
     hello-objs := hello1.o hello2.o
    运行时:make -C /lib/modules/`uname -r`/build M=`pwd`
3.多个文件编译多个模块,模快之间有引用
 文件结构:                   |
               ------------------------------
               |              |            |
            Makefile         foo/        bar/
                               |          |
                           --------     -------
                           |       |    |      |
                    Makefile  hello1.c  Makefile hello2.c
顶极Makefile文件的写法:
   obj-y := foo/  bar/
下一级的Makefile文件写法同1和2
在顶极Makefile所在的目录下运行:
   make -C /lib/modules/`uname -r`/build M=`pwd`
相关阅读 更多 +
排行榜 更多 +
PvZ戴夫的时空冒险重置

PvZ戴夫的时空冒险重置

策略塔防 下载
PVZTV雪版阳光加50

PVZTV雪版阳光加50

策略塔防 下载
双刃战士雪姐

双刃战士雪姐

冒险解谜 下载