I've just started looking at make files but was unsure of what the default behaviour (running the command make with no parameters) of a make file is when targets after the 1st are not dependancies of the 1st .
myprogram: main.o foo.o
gcc -o myprogram main.o foo.o
main.o: main.c foo.h
gcc -c main.c
foo.o: foo.c foo.h
gcc -c foo.c
main2.o: main2.c foo2.h
gcc -c main2.c
foo2.o: foo2.c foo2.h
gcc -c foo2.c
So from the above if I were to run make
and the files main2.c
and foo2.c
were updated would the commands gcc -c main2.c
and gcc -c foo2.c
both run?