I am trying to create a simple make file. I know the problem is with spaces or t
ID: 3866109 • Letter: I
Question
I am trying to create a simple make file. I know the problem is with spaces or tab. I tried to change the spaces or tabs but it's still the same.
error. "Makefile 2 missing separator stop"
Please be aware if you'll copy an online solution or copy someone else's solution you will get a bad review.
1 all:a.out 2 echo: "Build Done!" 4 a.out:lab3sum17.O RB.o gcc lab3sum17.o RB.o 7 lab3sum17.0:lab3sum17.c RB.h gcc -c-Wall lab3sum17.c 0 RB.o:RB.c RB.h gcc -c -Wall RB.c 12 13 clean: rm -f .out .o 14 15Explanation / Answer
all: a.out
echo: "Build Done!"
a.out: lab3sum17.o RB.o
gcc lab3sum17.o RB.o
lab3sum17.o:
gcc -c -Wall lab3sum17.c
RB.o: RB.c
gcc -c -Wall RB.c
clean:
@rm -f *.out *.o
This worked! To remove the error you need to put a tab on 2nd line before echo and make sure there is no trailing blank spaces
Even put newline and a tab after clean: and begin the 'rm' command
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.