[prev] 111 [next]

Sidetrack: Make/Makefiles (cont)

If make arguments are targets, build just those targets:

prompt$ make module1.o
gcc -Wall -Werror -std=c11 -c module1.c

If no args, build first target in the Makefile.

prompt$ make
gcc -Wall -Werror -std=c11 -c module1.c
gcc -Wall -Werror -std=c11 -c module2.c
gcc -Wall -Werror -std=c11 -c main.c
gcc -o exec main.o module1.o module2.o