Note that, if you change just one source-code file, you need only to recompile it into an object file and to link it with the object files previously produced from unchanged source-code files. You save time, because you do not have to wait for your C compiler to produce object code from most of your source-code files.
Suppose, for example, that you have a working analyze_trades
program, but you make a change in the main.c
source-code file. You
therefore need to recompile main.c
:
cc -c main.c
Then, you need to relink object files together:
cc -o analyze_trades main.o trades.o
You do not, however, need to recompile trades.c
.