我有简单的makefile:
CC=gcc
CFLAGS=-I.
DEPS = f1.h,hellomake.h
$(info starting makefile )
%.o: %.c $(DEPS)
$(info executing)
$(CC) -c -o $@ $< $(CFLAGS)
hellomake: hellomake.o hellofunc.o f1.o
gcc -o hellomake hellomake.o hellofunc.o f1.o -I.
我希望在每个目标文件生成上打印executing
行。但这没有发生。我的错误在哪里。
答案 0 :(得分:0)
在Makefile中替换此行:
$(info executing)
这一行:
@echo "executing"