这是我的Makefile
# Makefile to build web server
CC = gcc # gcc = c compiler
CFLAGS = -std=c99 -ggdb3 -static -Wall -O3 -Werror
OBJECTS = webserver.o
# Build web server as exectuable called "make clean all" by typing "make clean all" in terminal
all: $(OBJECTS)
$(CC) $(CFLAGS) -o sysstatd # <============= THIS LINE DEFINITELY STARTS WITH TAB
webserver.o: webserver.c
clean:
rm -rf *.o sysstatd
我收到以下错误:
Makefile:11: *** missing separator. Stop.
答案 0 :(得分:0)
根据make
要求,
配方中的每一行都必须以制表符
开头
所以,在你的makefile中,
$(CC) $(CFLAGS) -o sysstatd # <============= THIS LINE
应以tab
开头,而不是空格。
有关详细信息,请查看GNU Make Error Message list。