请教各位大神,cygwin下makefile中的recipe for target 'all' failed是什么原因?

[复制链接]
查看11 | 回复1 | 2021-1-27 06:45:11 | 显示全部楼层 |阅读模式
Makefile:
CC=gcc
TARGET=tdd.exe
OBJ=*.o
SRC=ledDriver/ledDriverTest.c\
ledDriver/ledDriverTestRunner.c\
unity/src/unity.c\
unity/extras/fixture/src/unity_fixture.c\
AllTest.c
INCLUDE=-Iunity/extras/fixture/src-Iunity/src
SYMBOLS=-c-w

all:$(TARGET)
./$(TARGET)
$(TARGET):$(OBJ)
$(CC)-o$(TARGET)$(OBJ)
$(OBJ):$(SRC)
$(CC)$(INCLUDE)$(SYMBOLS)$(SRC)
.PHONY:clean
clean:
rm-rf$(TARGET)$(OBJ)
make结果:
$make
gcc-Iunity/extras/fixture/src-Iunity/src-c-wledDriver/ledDriverTest.cledDriver/ledDriverTestRunner.cunity/src/unity.cunity/extras/fixture/src/unity_fixture.cAllTest.c
gcc-otdd.exe*.o
./tdd.exe
Unitytestrun1of1
.ledDriver/ledDriverTest.c:24:TEST(ledDriver,ledsOffAfterCreate):FAIL:Starthere
-----------------------
1Tests1Failures0Ignored
FAIL
Makefile:15:recipefortarget'all'failed
make:***[all]Error1

分 -->
回复

使用道具 举报

千问 | 2021-1-27 06:45:11 | 显示全部楼层
把在makefile中的执行文件屏蔽试试!
./$(TARGET)
以前没见过这么写法的!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行