Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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 15

Explanation / 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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote