Hi, I am working on a growing c program in a Unix environment.
I have a main program which is linked to some other programs through header files. I compile them all at once as follows
gcc main.c a1.c b1.c
It works. But if I just make changes in a1.c, is there any way I can just recompile that part, and then linking it somehow? (Rather than recompiling everything)
Further, I have an alternative file called a2.c which can replace a1.c (the files contain functions with the same I/O, but somewhat different functionality). If I want to run some runs with a1.c and some with a2.c, do I need to recompile between the runs or is there some way I can have compiled versions of a1 and a2 and simply indicate which one to use when I execute the main program?
Thanks for any and all help.
Tor