在Makefile中,常见的规则有以下几种:
target: dependencies
command
foo.o
:%.o: %.c
command
.PHONY: target
target:
command
VPATH = src include
%.o: %.c
command
ifeq ($(condition),true)
target: dependencies
command
endif
target: $(function arguments)
command
以上是一些常见的Makefile编写规则,它们可以帮助我们定义和控制程序的编译和构建过程。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:makefile的编写规则是什么