Very trivial example of compiling a C program. It compiled 'main.c' & 'utils.c' into 'program' (these are just dummy C files which don't do anything interesting). To try it out, do: ./compile You can also try deleting intermediate files (eg. rm main.o) and see which files get rebuilt.