Question: Please, help! Explain lines from 21 to 30 inside Makefile. (C programming in Linux) Thank you. 1 # The variable CC specifies which compiler will
Please, help! Explain lines from 21 to 30 inside Makefile. (C programming in Linux) Thank you.
1 # The variable CC specifies which compiler will be used. 2 # (because different unix systems may use different compilers) 3 CC=gcc 4 5 # The variable CFLAGS specifies compiler options 6 # Only compile (don't link) 7 # -Wall: Enable all warnings about lazy | dangerous C programming 8 # -std=c99: Using newer 099 version of C programming language 9 CFLAGS=-C -Wall -std=c99 10 11 # All of the .h header files to use as dependencies 12 13 # All of the object files to produce as intermediary work 14 OBJECTS=main.o 15 16 # The final program to build 17 EXECUTABLE=demo 18 19 # 20 21 all: $(EXECUTABLE) 22 23 $(EXECUTABLE): $(OBJECTS) 24 $(CC) $(OBJECTS) -0 $(EXECUTABLE) 25 26%.0: %.c $(HEADERS) 27 $(CC) $(CFLAGS) -0 $@ $
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
