Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Makefile:6: *** missing separator. Stop

Tags:

makefile

HEADERS = schedule.h 

default: papcmp

program.o: schedule.c $(HEADERS)
    gcc -g -lnuma -lm -pthread schedule.c -lutil -lz -o schedule.o

program: schedule.o
    gcc schedule.o -o papcmp

clean:
    -rm -f schedule.o
    -rm -f papcmp
    -rm -f *.log dump.gz

This is the first time i'm trying to create a make file. and it looks like there is an error. Could you help me with it? The line that is in bold has the error according to the output.

like image 439
pistal Avatar asked Jun 10 '14 15:06

pistal


1 Answers

Make is very picky about spaces vs. tabs. Command lines absolutely must be indented with a single tab, and not spaces. You may need to adjust your editor to generate tab characters.

like image 133
nneonneo Avatar answered Nov 14 '22 11:11

nneonneo