QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 973|回复: 3

有关模块编程

[复制链接]
发表于 2003-6-2 11:24:21 | 显示全部楼层 |阅读模式
有了解的ggjjddmm请告知:makefile怎么写?如何执行呢?
发表于 2003-6-2 21:27:09 | 显示全部楼层
search in this forum, there is a sample makefile here.

ldd2 book also has it. the sample with it is a little complex, but ok.
回复

使用道具 举报

发表于 2003-6-7 11:25:57 | 显示全部楼层
这个论坛上有这样的例子嘛??找了半天没有看到啊
回复

使用道具 举报

发表于 2003-6-7 11:52:56 | 显示全部楼层
anyway, i post it again.
------------------------------
[code:1]
CC = gcc

CFLAGS:= -O2 -Wall -D__KERNEL__ -DMODULE
INCLUDEDIR = /usr/src/linux/include

CFLAGS += -I$(INCLUDEDIR)

TARGET = hello
OBJS = $(TARGET).o
SRC = $(TARGET).c

all: $(TARGET).o

clean:
        rm -f *.o *~ core
[/code:1]
-----------------------------------------------
u modify it as u need and run make.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 04:37 , Processed in 0.042966 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表