当前位置:网站首页>Makefile related syntax summary (openc910)
Makefile related syntax summary (openc910)
2022-07-26 22:31:00 【East Slope】
1. @ Indicates that the following instruction information will not be displayed during execution , example :
![]()
2. $ Replace stay makefile Variables defined in or variables defined on the command line , example :
![]()
3. (findstring FIND,IN) stay “IN” Find in “FIND” , Return if present “FIND”, Otherwise, it returns empty
4. -s Do not display content on the screen when executing commands ( Execution process )
5. $(warning TEXT…) Non fatal error , Print tips only “ TEXT…”, make The execution process of continues
6. $(error TEXT…) Fatal error , Printing tips “ TEXT…” Information , And exit make Implementation
7. “ifeq” else”“endif” Can't use [Tab] Key as start ( Otherwise it's considered an order ), example :

8. stay makefile in ,tab And spaces are strictly separated
- With TAB The first is shell Script Syntax , Statements are passed directly to shell To analyze
- Such as : echo The order is shell grammar , Can only tab start
- What starts with a space is makefile grammar
- Such as :ifneq yes makefile grammar , Can only start with a space
9. make It's reading Makefile The value of the conditional expression is calculated , And select the execution statement according to the value of the conditional expression
10. When in shell In execution make On command ,make The working process is as follows :
- 1)、make The name will be found in the current directory “Makefile” or “makefile” The file of
- 2)、 Find the first target file in the file , And take this document as the final target document
- 3)、 If the first target file does not exist , Or the following dependent files ( .o) The modification time is newer than the first object file , that , He will execute the commands defined later to generate the object file
- 4)、 If the dependent file does not exist , that make The entry that generates the dependent file will be found in the current file , First execute it to generate dependent files .o file , Then come back to generate the target file
- notes : If the dependent file does not exist , First execute the commands in the dependency , Generate dependency file , Then execute the following command

11. usage 1:

analysis :
1. SRC=$(wildcard *.S) # Get all in the current directory .S file name
2. $( SRC: %.S=%.o) or ${ SRC: %.S=%.o } # Put variables SRC Every... In ⼀ End of values ⽤ %.o Replace %.S
12. usage 2:

analysis :
1. find ./tests/lib/ -maxdepth 1 -type f -exec cp {} ./work/ \;
- ./tests/lib/ Find the path
- -maxdepth 1 In depth 1 The place of , That is, under the current path file
- -type f The document type is general
- -exec cp {} ./work/ \ Carry out orders cp {} ./work/ \, Copy the found file to work Next
2. cd ./work && make -s clean && make -s all CPU_ARCH_FLAG_0=c910
- Execute first cd ./work
- Re execution make -s clean
- Re execution make -s all
- Pass parameters CPU_ARCH_FLAG_0=c910
边栏推荐
猜你喜欢

DAO 的发展状态

mysql推荐书

Try new functions | decrypt Doris complex data type array

Sell 700million a year, and get ready for the IPO of Dezhou braised chicken

The trailer of Samsung Galaxy Z foldable product leaked: 'flexibility is better than plane'

Xiaobai learns MySQL - derived table

Height collapse caused by floating

博途PLC输出通道映射FC

模块8(消息队列存储消息数据的mysql表格)

30000 hair loss people, supporting an IPO
随机推荐
ORM同时使用不同数据源和不同命名转换
自己学习Cesium的笔记简介
Y78. Chapter IV Prometheus' monitoring system and practice -- Prometheus' service discovery mechanism (IX)
Chapter 15 MySQL user management
Leetcode 122: the best time to buy and sell stocks II
MySQL recommendation
新兴市场潜力无限,ADVANCE.AI风控产品助中国出海企业筑牢安全发展基础
VCS编译、仿真过程
Linear DP of dynamic programming
MySQL数据库介绍
The potential of emerging markets is unlimited, and advance.ai risk control products help Chinese offshore enterprises build a solid foundation for safe development
Leetcode:857. Minimum cost of employing K workers [think in blocks + start with simplicity]
【Try to Hack】防火墙(一)
Five years after graduation, I changed from information management to software testing engineer, and my monthly salary finally exceeded 12K
Makefile相关语法总结(Openc910)
Excel-vba quick start (XI. Common string operations)
what is a kit in qt
what crlf mean
2018 arXiv preprint | MolGAN: An implicit generative model for small molecular graphs
DTS is equipped with a new self-developed kernel, which breaks through the key technology of the three center architecture of the two places Tencent cloud database