Github IO

ucore OS 实验 Lab1 —— Makefile

Rule

target: prerequisite
  recipes
  ...

Variable

string can be variable name, variable's value is string

Assignment

  • =: recursively expanded assignment, expand and calculate
  • :=: simply expanded assignment, calculate when defined and expand

Automatic Variable

  • target: @ %
  • prerequisite: < ? ^ *

Function

user-defined function:
f = ...
\(\$(call\ f,\$(1),\$(2),\$(3),...)\)

  • call
  • foreach, if
  • patsubst, addprefix, addsuffix

说明: 这是我在学习清华大学ucore-OS-lab1 中的Makefile的时候的学习记录,出发点基于自己的所见所闻和使用爱好,以供自查。``

posted @ 2021-03-11 03:23  laiyk  阅读(87)  评论(0)    收藏  举报