今天编辑一个Makefile文件发生了一些奇怪的问题,以下是我的Makefile原文:
#build helloworld executable when user executes "make"
helloworld: helloworld.o
$(CC) $(LDFLAGS) helloworld.o -o helloworld
helloworld.o: helloworld.c
$(CC) $(CFLAGS) -c helloworld.c
# remove object files and executable when user executes "make clean"
clean:
rm *.o helloworld
make后报错:*** missing separator. Stop.
经过百度我发现错误的原因是因为命令行没有用Tab键作为开始,可我反复差错发现我的命令确实是用Tab进行开始