📜  Windows 和 linux 的 makefile 变量 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:07.241000             🧑  作者: Mango

代码示例1
ifdef OS
   RM = del /Q
   FixPath = $(subst /,\,$1)
else
   ifeq ($(shell uname), Linux)
      RM = rm -f
      FixPath = $1
   endif
endif

clean:
    $(RM) $(call FixPath,objs/*)