1. 我的Makefile文件如下
# set to your kernel tree
KERNEL = /home/linux
# get the Linux architecture. Needed to find proper include file for CFLAGS
ARCH=$(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
# set default flags to compile module
CFLAGS = -D__KERNEL__ -DMODULE -I$(KERNEL)/include
CFLAGS+= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing
all: sharelist.o
# get configuration of kernel
include $(KERNEL)/.config
# modify CFLAGS with architecture specific flags
include $(KERNEL)/arch/${ARCH}/Makefile
# enable the module versions, if configured in kernel source tree
ifdef CONFIG_MODVERSIONS
CFLAGS+= -DMODVERSIONS -include $(KERNEL)/include/linux/modversions.h
endif
# enable SMP, if configured in kernel source tree
ifdef CONFIG_SMP
CFLAGS+= -D__SMP__
endif
# note: we are compiling the driver object file and then linking
# we link it into the module. With just one object file as in
# this example this is not needed. We can just load the object
# file produced by gcc
# link the thread driver module
sharelist.o: sharelist.c
gcc $(CFLAGS) -c sharelist.c
clean:
rm -f *.o
# modify CFLAGS with architecture specific flags
include $(KERNEL)/arch/${ARCH}/Makefile
2. sharelist.c文件已编写好
3.
我的本来理解是:把arch/${ARCH}/Makefile文件和.config文件存储到/home/linux下,而linux文件夹只是个用户文件夹,可以随着自己定义的不同而变化,比如我的电脑上是/home/chen,就是把arch/${ARCH}/Makefile文件和.config文件存储到chen文件夹下,然后把Makefile中开始部分的代码改为KERNEL = /home/chen,不知道我的理解对不对
问题:每次以输入make就显示arch/${ARCH}/Makefile和.config找不到,但是我在LINUX中搜索.config根本找不到,找到的只是*.config形式的文件,至于arch/${ARCH}/Makefile,因为前面ARCH的复杂定义,我就更摸不着头脑了,我刚刚接触LINUX不久,希望有高手能帮我解决一下上述问题
邮箱:[email protected]
QQ: 416508484
[问题].config文件在ubuntu的什么文件夹下
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 2
- 注册时间: 2007-10-18 15:40
-
- 帖子: 214
- 注册时间: 2007-07-16 21:42
-
- 帖子: 2
- 注册时间: 2007-10-18 15:40
我搜索了的,没有
一是我不知道unubtu的内核文件夹在什么地方,redhat的内核文件一般在/usr/src下,但unubtu下似乎并不在那个录下;二是我在整个文件系统都搜索过,没有什么.config文件的
邮箱:[email protected]
QQ: 416508484
MSN:[email protected]
邮箱:[email protected]
QQ: 416508484
MSN:[email protected]