What happens when my program includes a header that includes another header? Say, for example, main.c includes header1.h, and header1.h includes header2.h. Should my makefile be:
main.x: main.o
gcc -o main.x
main.o: main.c header1.h header2.h
gcc -c main.c
OR is it unnecessary to include header2.h?
main.x: main.o
gcc -o main.x
main.o: main.c header1.h
gcc -c main.c
Or is it unnecessary to include any headers at all?
main.x: main.o
gcc -o main.x
main.o: main.c
gcc -c main.c