当前目录有同makefile中同名的文件,make目标是不会执行的
clean:的依赖是空的,执行的规则条件没有满足.
伪目标是为了解决这个问题,在clean前面增加.PHONEY:clean
include Makefile.config
SRC := $(wildcard *.c wildcard audio_module/*.c)
SRC_OBJ = $(patsubst %.c,%.o,$(SRC))
all:
$(info contents $(SRC))
$(info objfiles $(SRC_OBJ))
.PHONY:clean
clean:
$(RM) $(SRC_OBJ)
如果没有PHONEY
include Makefile.config
SRC := $(wildcard *.c wildcard audio_module/*.c)
SRC_OBJ = $(patsubst %.c,%.o,$(SRC))
all:
$(info contents $(SRC))
$(info objfiles $(SRC_OBJ))
clean:
$(RM) $(SRC_OBJ)