LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   makefile:4: *** missing separator. Stop (https://www.linuxquestions.org/questions/programming-9/makefile-4-%2A%2A%2A-missing-separator-stop-607369/)

klavuzkarga 12-17-2007 10:53 AM

makefile:4: *** missing separator. Stop
 
in my project there are 2 c programs and 1 shell script.

in the same directory, there are;

Code:

program1.c
program2.c
makefile
shellScript.sh

my makefile is;

Code:

shellScript: program1 program2
       
program1: program1.c
gcc -o program1 program1.c
program2: program2.c
gcc -o program2 program2.c

and it's name is makefile. it hasn't got an extension.

could you tell me what is wrong with it ?

makyo 12-17-2007 11:27 AM

Hi.

You need a TAB before each "recipe" line.

See http://www.wlug.org.nz/MakefileHowto , for example ... cheers, makyo
Code:

shellScript: program1 program2

program1: program1.c
        gcc -o program1 program1.c
program2: program2.c
        gcc -o program2 program2.c



All times are GMT -5. The time now is 05:04 AM.