Makefile:2: *** missing separator. Stop

You need a real tab instead of space in front of g++ and rm commands. If still fails then your editor is inserting spaces instead, even if you’re hitting the tab key on your keyboard. You need to configure your editor to insert hard tabs (09 in ASCII) instead.

Like

all: decryptor.cpp prod-ent.cpp
*****g++ prod-ent.cpp -o prod-ent -g
*****g++ decryptor.cpp -o decryptor -g -lcryptopp
clean:
*****rm prod-ent
*****rm decryptor

Instead ***** replace TAB.

You can check your side by command

cat -e -t -v  makefile

It’s show line starting by ^I if TAB is given to that line and it end the line by $.

Also you can do by ;

all: decryptor.cpp prod-ent.cpp ; g++ prod-ent.cpp -o prod-ent -g ; g++ decryptor.cpp -o decryptor -g -lcryptopp
clean: ; rm prod-ent ; rm decryptor

Leave a Comment