I have some c files that I want to compile separately and link them together using a bat file. I will compile/link them using gcc.
The problem is that new c files might be added and I want the bat file to compile/link everything without knowing the exact number of files(without modifying the bat file).
Something like :
for X=1:number_of_c_files
gcc -c sourceX.c
and then link them together.
All the files are named compile_to_cX.c , where X is a value from 1 to the number of c files from the directory.
Thanks in advance !