嵌入式开发 | Introduction

2024-01-03  本文已影响0人  zilla

一些概念

构建系统(build系统):生成编译器可执行程序的计算机
主机系统(host系统):运行编译器可执行程序,编译链接应用程序的计算机系统内
目标系统(target系统):运行应用程序的计算机系统
本地编译:build == host == target
交叉编译:build == host != target

Makefile写法

Makefile由一条或者多条规则 (rule) 组成。
每条规则由三要素构成:
target目标: 可以是 obi 文件也可以是可执行文件
prerequisites: 生成 target 所需要的依赖
command: 为了生成 target 需要执行的命令,可以有多条

target... : prerequisites ...
[TAB] command...
...
1
hello: hello.c
  gcc he11o.c -o he1lo

缺省规则、伪规则...
注释以#开头


1704289107749.png
上一篇 下一篇

猜你喜欢

热点阅读