#
# 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. C# 调用 Outlook发送邮件实例

    添加引用:Microsoft.Office.Interop.Outlook using System; using System.Collections.Generic; using System.L ...

  2. touch穿透

    出现穿透的前提:上层绑定touch事件,下层绑定click事件. 解决方案:touchend绑定: e.preventDefault();$(下层).css("pointer-events& ...

  3. 扩展XAF模型信息实现自定义功能

    如何隐藏 web listview 的 编辑控制列如下图: 这列怎么让它隐藏? 感谢[少侠]XAF_杨东 提供解答!感谢XAF_小学生整理.   A: 注册自定义接口IModelListViewExt ...

  4. C#中调用Matlab人工神经网络算法实现手写数字识别

    手写数字识别实现 设计技术参数:通过由数字构成的图像,自动实现几个不同数字的识别,设计识别方法,有较高的识别率 关键字:二值化  投影  矩阵  目标定位  Matlab 手写数字图像识别简介: 手写 ...

  5. 基于struts2、spring的应用闲置一段时间后报空指针错(转)

    在做struts2.spring网站时,在系统闲置一段时间后,访问页面会出错,第二次再访问就正常了.后来查了后台日志,发现是数据库连接关闭了,导致页面访问出错.页面上报空指针错误,错误没有保留,日志中 ...

  6. css+div打造三角形(箭头)

    在很多网站都见过这样的箭头,之前我一直以为是图片,直到今天才知道原来可以用css做.开始看代码没太看懂,后来自己试了几遍才恍然大悟.贴出来分享下.(大神请直接忽略) 先看代码: HTML部分就是一个单 ...

  7. STM32学习笔记(十) CAN通讯测试(环回模式)

    1.CAN通讯的理解 想学习CAN通讯,那么要对通讯协议有一定的认知.通讯协议是指通信双方对数据传送控制的一种约定.约定中包括对数据格式,同步方式,传输速度,传送步骤,检纠错方式以及控制字符定义等问题 ...

  8. 原!!mybatis如何直接 执行传入的任意sql语句 并按照顺序取出查询的结果集

    需求: 1.直接执行前端传来的任何sql语句,parameterType="String", 2.对于任何sql语句,其返回值类型无法用resultMap在xml文件里配置或者返回 ...

  9. Security » Authentication » Identity介绍

    Introduction to Identity¶ By Pranav Rastogi, Rick Anderson, Tom Dykstra, Jon Galloway and Erik Reita ...

  10. 6/8/9/10/11 Sprint2 看板和燃尽图

     端午放假,大家都回家了 页面模块的大体设计,因所找的资料不全,还待改善