pistal
pistal

Reputation: 2456

Makefile:6: *** missing separator. Stop

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.

Upvotes: 20

Views: 25553

Answers (2)

Curious Watcher
Curious Watcher

Reputation: 689

Make TAB to make it work!


Example working code with TAB symbol as orange line

working version


Original code with spaces highlighted in Notepad++:

your code in Notepad++ with spaces highlighted

Upvotes: 0

nneonneo
nneonneo

Reputation: 179677

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.

Upvotes: 46

Related Questions