#
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...
#.S文件编译为.s文件
.S.s:
    $(CPP) -traditional $< -o $*.s
#.c文件编译为.s文件
.c.s:
    $(CC) $(CFLAGS) -S $<
#.s文件编译为.o文件    
.s.o:
    $(AS) -c -o $*.o $<
#.c文件编译为.o文件    
.c.o:
    $(CC) $(CFLAGS) -c $<
#定义变量
OBJS  = sched.o sys_call.o traps.o irq.o dma.o fork.o \
     panic.o printk.o vsprintf.o sys.o module.o ksyms.o exit.o \
    signal.o mktime.o ptrace.o ioport.o itimer.o \
    info.o ldt.o time.o
#此文件夹最后的编译目标
all: kernel.o
#将定义的.o文件链接为一个kernel.o闻不见
kernel.o: $(OBJS)
    $(LD) -r -o kernel.o $(OBJS)
    sync

sys_call.s: sys_call.S

sys_call.o: sys_call.s

sched.o: sched.c
    $(CC) $(CFLAGS) $(PROFILING) -fno-omit-frame-pointer -c $<

ksyms.lst: ksyms.S ../include/linux/autoconf.h
    $(CPP) $(CFLAGS) $< > $@
#生成ksyms.s文件
ksyms.s: ksyms.sh ksyms.lst
    sh $< > $@

ksyms.o: ksyms.s
#确定依赖
dep:
    $(CPP) -M *.c > .depend

dummy:

#
# include a dependency file if one exists
#
#引入相关依赖
ifeq (.depend,$(wildcard .depend))
include .depend
endif

kernel/Makefile的更多相关文章

  1. Linux kernel Makefile for ctags

    /********************************************************************** * Linux kernel Makefile for ...

  2. kernel Makefile Kconfig说明

    实际文档位置:Documentation/kbuild/makefiles.txt,此为翻译稿. *************************************************** ...

  3. Linux ARM kernel Makefile and Kconfig

    kernel build:顶层Makefile:-->1. include build/main.mk    -->2. include build/kernel.mk         k ...

  4. kernel——Makefile, head.S ...

    在Makefile中找到的重要信息: (1)连接脚本 通过连接脚本,知道的信息: (1)入口符号 stext (2)入口连接地址 0xC0000000 + 0x00008000 根据入口符号,可以找到 ...

  5. Linux Kernel Makefile Test

    一.本文说明 本文为linux内核Makefile整体分析的续篇,是依据Linux内核Makefile体系的主要内容编写一个简要的测试工程.Linux内核Makefile体系就好像一只“大鸟”,而这篇 ...

  6. Linux Kernel的Makefile与Kconfig文件的语法

    https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt Introduction ------------ The c ...

  7. linux内核的makefile.txt讲解

    linux内核的linux-3.6.5\Documentation\kbuild\makefiles.txt Linux Kernel Makefiles This document describe ...

  8. Linux学习 :Uboot, Kernel, 根文件系统初步分析

    1.U-Boot启动内核的过程可以分为两个阶段: 1)第一阶段的功能 硬件设备初始化 加载U-Boot第二阶段代码到RAM空间 设置好栈 跳转到第二阶段代码入口 2)第二阶段的功能 初始化本阶段使用的 ...

  9. Linux 2.6内核Makefile浅析

    1 概述 Makefile由五个部分组成: Makefile:根目录Makefile,它读取.config文件,并负责创建vmlinux(内核镜像)和modules(模块文件). .config:内核 ...

随机推荐

  1. HTML表格与列表

    HTML表格 表格其实就是很多的小单元格,而这些小单元格很有次序的排列着,它们有很多行,很多列.这些很多行列组成的东西,就叫表格,表格是<table>标签来定义的.而<table&g ...

  2. C#编写最小化时隐藏为任务栏图标的 Window appllication.

    1.设置WinForm窗体属性showinTask=false 2.加notifyicon控件notifyIcon1,为控件notifyIcon1的属性Icon添加一个icon图标. 3.添加窗体最小 ...

  3. 使用自己的CSS框架(转)

    [经典推介]CSS框架选择向导 不少CSS框架已经存在了一段时间,但大多数Web开发人员避免使用它们. 相反最有经验的开发者希望创建自己的CSS框架,提供个性化解决方案的优势,并减少对第三方的解决方案 ...

  4. (转) linux之sort用法

    sort命令是帮我们依据不同的数据类型进行排序,其语法及常用参数格式: sort [-bcfMnrtk][源文件][-o 输出文件] 补充说明:sort可针对文本文件的内容,以行为单位来排序. 参 数 ...

  5. 解决 Cannot find OpenSSL's <evp.h>

    yum install openssl openssl-devel ln -s /usr/lib64/libssl.so /usr/lib/

  6. vs 2005 使用 boost regex

    第一步: Boost 入门及其VS2005下编译boost库  boost.regex库安装指南  深入浅出之正则表达式(一)  C++中三种正则表达式比较(C regex,C ++regex,boo ...

  7. Setup Factory Error3014

    在用Setup Factory打包软件的时候出现Error3014 一般都是由于软件冲突引起的 我的问题是由于杀毒软件 ,在打包的时候关闭杀毒软件 就能成功打包了.

  8. update

    update `表名` set 字段名 =replace(字段名, '查找的内容','更改的内容') where 字段名 like '%查找的内容%'; update shangpin set cli ...

  9. 数组的sort方法

    今天在看<JavaScript高级程序设计第三版>时,学到了数组的sort方法.知道这个方法,但是一直没仔细研究过,这次发现,它是把数组内的值用toSting()变为字符串再进行比较,这样 ...

  10. matlab实现感知机算法--统计学习小灶

    clear all; clc; %% %算法 %输入:训练数据集T = {(x1,y1),(x2,y2),...,(xn,yn)};学习率η %输出:w,b;感知机模型f(x) = sign(w*x+ ...