I have a makefile, provided at the end, and a few questions about it:
- What does the
clean:
part do? - What does the
-c
part mean? (A Google search forgcc -c explained
and other variations gives me a college with the acronym GCC.) When I try to run make, I get this error, but the file
lab3p2.c
definitely exists. What is wrong?gcc –c lab3p2.c gcc: –c: No such file or directory make: *** [lab3p2.o] Error 1
Makefile
all: lab3p2
lab3p2: lab3p2.o lab3p2f1.o lab3p2f2.o lab3p2f3.o
gcc lab3p2.o lab3p2f1.o lab3p2f2.o lab3p2f3.o –o lab3p2
lab3p2.o: lab3p2.c
gcc –c lab3p2.c
lab3p2f1.o: lab3p2f1.c
gcc –c lab3p2f1.c
lab3p2f2.o: lab3p2f2.c
gcc –c lab3p2f2.c
lab3p2f3.o: lab3p2f3.c
gcc –c lab3p2f3.c
clean:
rm –rf *.o lab3p2