alittlekid 发表于 2003-6-2 11:24:21

有关模块编程

有了解的ggjjddmm请告知:makefile怎么写?如何执行呢?

Dragonfly 发表于 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.

amelie 发表于 2003-6-7 11:25:57

这个论坛上有这样的例子嘛??找了半天没有看到啊

Dragonfly 发表于 2003-6-7 11:52:56

anyway, i post it again.
------------------------------

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

-----------------------------------------------
u modify it as u need and run make.
页: [1]
查看完整版本: 有关模块编程