#
# 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. java高薪之路__004_泛型

    参考地址: 1. http://www.cnblogs.com/lwbqqyumidi/p/3837629.html2. http://www.cnblogs.com/abcwt112/p/47350 ...

  2. caffe中各层的作用:

    关于caffe中的solver: cafffe中的sover的方法都有: Stochastic Gradient Descent (type: "SGD"), AdaDelta ( ...

  3. 【ros】.bag文件

    Bags are typically created by a tool like rosbag They store the serialized message data in a file as ...

  4. angular 三目运算符 需要换色或style

    解决方法:直接简单粗暴写两个.有点挫,但实现需求了. <font style="color:red" ng-show="boxlist.lineTitle.leng ...

  5. HTML5 十大新特性(一)——语义标签

    说语义标签前先来理解下什么叫语义化,当下html是靠div+css来铸造页面的整体框架和结构的,通篇大量的div可读性极低,因此诞生了这些特殊的标签,简单地说就是见名知义,使页面更清晰,方便维护和开发 ...

  6. null和undefined

    null表示"没有对象",即该处不应该有值.典型用法是: (1) 作为函数的参数,表示该函数的参数不是对象. (2) 作为对象原型链的终点. undefined表示"缺少 ...

  7. viewer.js图片查看器插件(可缩放/旋转/切换)

    <!doctype html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  8. Oracle job定时器的执行时间间隔学习汇总

      Oracle job 定时器的执行时间间隔也是定时器job 的关键设置,在这一设置上,开始还没掌握,总是不知道怎么写,现总结如下,其实主要是使用了TRUNC.NEXT_DAY .ADD_MONTH ...

  9. Windows Store App 全球化:在XAML元素中引用文件资源

    上一小节讲解了如何在XAML元素中使用x:Uid属性引用资源文件中的字符串资源,通过改变语言首选项显示不同的运行结果.如果把字符串资源变成文件资源,就不能使用x:Uid属性来引用这些文件资源.本小节将 ...

  10. jquery Ajax的load、post、get、put、delete的用法

    1.load() load()方法是jquery中最简单和常用的Ajax方法,能载入远程html代码并插入到DOM中,结构为load( url [, data] [, callback]);     ...