kernel/Makefile
#
# 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的更多相关文章
- Linux kernel Makefile for ctags
/********************************************************************** * Linux kernel Makefile for ...
- kernel Makefile Kconfig说明
实际文档位置:Documentation/kbuild/makefiles.txt,此为翻译稿. *************************************************** ...
- Linux ARM kernel Makefile and Kconfig
kernel build:顶层Makefile:-->1. include build/main.mk -->2. include build/kernel.mk k ...
- kernel——Makefile, head.S ...
在Makefile中找到的重要信息: (1)连接脚本 通过连接脚本,知道的信息: (1)入口符号 stext (2)入口连接地址 0xC0000000 + 0x00008000 根据入口符号,可以找到 ...
- Linux Kernel Makefile Test
一.本文说明 本文为linux内核Makefile整体分析的续篇,是依据Linux内核Makefile体系的主要内容编写一个简要的测试工程.Linux内核Makefile体系就好像一只“大鸟”,而这篇 ...
- Linux Kernel的Makefile与Kconfig文件的语法
https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt Introduction ------------ The c ...
- linux内核的makefile.txt讲解
linux内核的linux-3.6.5\Documentation\kbuild\makefiles.txt Linux Kernel Makefiles This document describe ...
- Linux学习 :Uboot, Kernel, 根文件系统初步分析
1.U-Boot启动内核的过程可以分为两个阶段: 1)第一阶段的功能 硬件设备初始化 加载U-Boot第二阶段代码到RAM空间 设置好栈 跳转到第二阶段代码入口 2)第二阶段的功能 初始化本阶段使用的 ...
- Linux 2.6内核Makefile浅析
1 概述 Makefile由五个部分组成: Makefile:根目录Makefile,它读取.config文件,并负责创建vmlinux(内核镜像)和modules(模块文件). .config:内核 ...
随机推荐
- Less入门到上手——前端开发利器<一>
摘录less官网的解释: LESSCSS是一种动态样式语言,属于CSS预处理语言的一种,它使用类似CSS的语法,为CSS的赋予了动态语言的特性,如变量.继承.运算.函数等,更方便CSS的编写和维护. ...
- Oracle在归档模式下恢复
=============== 数据库的完全恢复 =============== 在归档模式下数据库完全恢复时,数据库所经过的状态如下: 1.利用备份修复(Restores)损坏或丢失的数据文件,即将 ...
- 点击datagrid弹出ldhdialog,点击弹出框的按钮,关闭且刷新datagrid
datagrid里的js这么写 //点击添加按钮触发 function superadd(title,addurl,gname,width,height) { gridname=gname; crea ...
- Evolutionary Computing: 2. Genetic Algorithm(1)
本篇博文讲述基因算法(Genetic Algorithm),基因算法是最著名的进化算法. 内容依然来自博主的听课记录和教授的PPT. Outline 简单基因算法 个体表达 变异 重组 选择重组还是变 ...
- KindEditor4.1.10,支持粘贴图片(转载!)
本人扩展了KindEditor4.1.10,使得他能够在Chrome和IE11中直接粘贴复制的图片(比如通过截图工具把图片直接保存在剪切板中),然后调用上传URL上传图片 方法,修改kindedito ...
- c语言完成分块查找
首先要把一系列数组均匀分成若干块(最后一个可以不均匀) 每块中元素任意排列,即块中数字无序,但是整个块之间要有序.因此也存在局限性. #include<stdio.h> //分块查找法 v ...
- Yii批量添加的问题
使用Yii进行批量添加的时候,执行后会发现表中只插入了foreach循环的最后一条数据,而其它数据没有添加成功,那是因为内存地址中循环时新一条数据会覆盖前一条数据,解决办法如下: 第一种方法: < ...
- Objective-C( Foundation框架 一 字符串)
Objective-C 中核心处理字符串的类是 NSString 与 NSMutableString ,这两个类最大的区别就是NSString 创建赋值以后该字符串的内容与长度不能在动态的更改,除非重 ...
- freemarker if elseif
FreeMarker模板 if, else, elseif 指令 : if, else, elseif 语法 <#if condition> ... <#elseif conditi ...
- dpkg命令的用法
dpkg 是Debian package的简写,为”Debian“ 操作系统 专门开发的套件管理系统,用于软件的安装,更新和移除. 所有源自"Debian"的Linux的发行版都使 ...