07 2020 档案
摘要:Makefile 易忘规则记录 主要用于记录一些Makefile中容易忘记的规则等 粗略规则 target... : prerequisites ... [tab] command ... 易忘规则 伪目标声明 .PHONY: clean clean: [tab] rm ./*.o 自动推导 a.o
阅读全文
摘要:Makefile中的自动化变量 参考链接:https://seisman.github.io/how-to-write-makefile/implicit_rules.html#id8 简介 所谓自动化变量,就是这种变量会把模式中所定义的一系列的文件自动地挨个取出,直至所有的符合模式的文件都取完。这
阅读全文
摘要:Makefile中的文件名操作函数 参考:https://seisman.github.io/how-to-write-makefile/functions.html#patsubst dir 功能:获取文件 <names> 的目录。目录是指最后一个反斜杠( / )之前的部分。如果没有反斜杠,那么返
阅读全文
摘要:Makefile中的字符串处理函数 参考:https://seisman.github.io/how-to-write-makefile/functions.html#patsubst subst 功能:把字串 <text> 中的 <from> 字符串替换成 <to> 。 $(subst <from
阅读全文