有关模块编程
有了解的ggjjddmm请告知:makefile怎么写?如何执行呢? 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. 这个论坛上有这样的例子嘛??找了半天没有看到啊 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]