gcc -c compiles source files without linking.
$ gcc -c [options] [source files]
Write source file myfile.c:
// myfile.c
#include <stdio.h>
void main()
{
printf("Program run\n");
}
Compile myfile.c:
$ gcc -c myfile.c
This compilation generated myfile.o object file.