所以我为ac程序制作了一个makefile。出于某种原因,我的“干净”不起作用。这是我的makefile的一点点:
CC=gcc
FLAGS=-c -Wall -I.
CLEANC=rm -rf *.o
move.o: move.c
$(CC) $(FLAGS) move.c
/*Lot more codes like this^^^*/
clean:
$(CLEANC)
Run Code Online (Sandbox Code Playgroud)
当我在命令提示符下运行“make clean”时,显示如下:
rm -rf *.o
process_begin: CreateProcess(NULL, rm -rf *.o, ...) failed.
make (e=2): The system cannot find the file specified.
makefile:116: recipe for target 'clean' failed
make: *** [clean] Error 2
Run Code Online (Sandbox Code Playgroud)
我无法弄清楚我做错了什么。我试过将 CLEANC 更改为
rm -f *.o
rm *.o
rm *o
rm -f *.o test.exe //test.exe is executable
Run Code Online (Sandbox Code Playgroud)
但无论我尝试什么,它仍然给我同样的错误。我真的可以使用帮助。提前致谢。