当前位置: 首页 > news >正文

Linux Makefile解析

linux makefile文件

/kernel/Makefile
例:

#
# Makefile for the FREAX-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).
#AR	=gar
AS	=gas
LD	=gld
LDFLAGS	=-s -x
CC	=gcc
CFLAGS	=-Wall -O -fstrength-reduce -fomit-frame-pointer -fcombine-regs \-finline-functions -mstring-insns -nostdinc -I../include
CPP	=gcc -E -nostdinc -I../include.c.s:$(CC) $(CFLAGS) \-S -o $*.s $<
.s.o:$(AS) -c -o $*.o $<
.c.o:$(CC) $(CFLAGS) \-c -o $*.o $<OBJS  = sched.o system_call.o traps.o asm.o fork.o \panic.o printk.o vsprintf.o tty_io.o console.o \keyboard.o rs_io.o hd.o sys.o exit.o serial.o \mktime.okernel.o: $(OBJS)$(LD) -r -o kernel.o $(OBJS)syncclean:rm -f core *.o *.a tmp_makefor i in *.c;do rm -f `basename $$i .c`.s;donedep:sed '/\#\#\# Dependencies/q' < Makefile > tmp_make(for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \$(CPP) -M $$i;done) >> tmp_makecp tmp_make Makefile### Dependencies:
console.s console.o : console.c ../include/linux/sched.h ../include/linux/head.h \../include/linux/fs.h ../include/sys/types.h ../include/linux/mm.h \../include/linux/tty.h ../include/termios.h ../include/asm/io.h \../include/asm/system.h ..............
http://www.lryc.cn/news/615455.html

相关文章:

  • 车流高峰漏检率↓85%!陌讯时序建模方案在智慧交通的实时优化​
  • Netbsd安装使用
  • Ubuntu下搭建LVGL模拟器
  • [SC]高效地调试SystemC模型中的语法错误
  • actuary notes[1]
  • urmom damn the jvm
  • C++2024 年一级
  • 基于 InfluxDB 的服务器性能监控系统实战(一)
  • P1053 [NOIP 2005 提高组] 篝火晚会
  • Linux学习--软件编程(shell命令)
  • 多线程(四) --- 线程安全问题
  • 使用 Ansys Discovery 进行动态设计和分析
  • js零基础入门
  • HashTable, HashMap, ConcurrentHashMap
  • Java 8 特性
  • 力扣(删除有序数组中的重复项I/II)
  • 20250808组题总结
  • 力扣 hot100 Day70
  • 力扣-35.搜索插入位置
  • SwiftUI 登录页面键盘约束冲突与卡顿优化全攻略
  • AI推理的“灵魂五问”:直面2025算力鸿沟与中国的破局之路
  • Java基础语法全面解析:从入门到掌握
  • MySQL 复制表详细说明
  • 三极管在电路中的应用
  • SpringSecurity过滤器链全解析
  • 工具箱许愿墙项目发布
  • Redis 事务机制
  • Mysql笔记-系统变量\用户变量管理
  • 机器学习 K-Means聚类 无监督学习
  • 数据结构初阶(7)树 二叉树