我的makefile告诉我编译错误吗?

时间:2010-10-26 07:03:36

标签: c makefile

exedarken: darken.c
    gcc -o exedarken darken.c

exeimagestats: imagestats.c
    gcc -o exeimagestats imagestats.c

exelighten: lighten.c
    gcc -o exelighten lighten.c

exerotate: rotate.c
    gcc -o exerotate rotate.c

exeflip: flip.c
    gcc -o exeflip flip.c

exematte: matte.c
    gcc -o exematte matte.c

Theres my makefile。有没有办法当我执行这个makefile时,我会看到我得到的编译错误?

2 个答案:

答案 0 :(得分:2)

在控制台中写:

make VERBOSE=1

答案 1 :(得分:2)

默认情况下,make打印它执行的任何命令的输出,即如果有编译错误,则应显示它们。

一个无关的说明:重复自己很糟糕;你的makefile可以简化为

executables := exedarken exeimagestats exelighten exerotate exeflip exematte

$(executables) : exe% : %.c
    gcc -o $@ $<
相关问题