Using Makefile to recompile only after changes
We can make use of Makefile features to only recompile our code when the source files changed. This can be achieved because make stats the file system to check whether the target is older than it’s dependencies. Makefile example all: main main: main.o gcc main.o -o main main.o: main.c gcc -c main.c The code above is a toy example. The name before the colon is our target and the name of the file generated by the command bellow it. The name or names after the colon are target’s dependencies. ...