Makefile - missing separator [duplicate]
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Make error: missing separator Have this code in makefile: PROG = semsearch all: $(PROG) %: %.c gcc -o $@ $< -lpthread clean: rm $(PROG) and the error missing separator. stop. Can someone help me? 回答1: You need to precede the lines starting with gcc and rm with a hard tab. Commands in make rules are required to start with a tab (unless they follow a semicolon on the same line). The result should look like this: