Compiling files in another directory
I have some c source files in one directory that I know can compile with a separate script. I now what to make some changes and recompile them.
I moved the script to a second newly created directory and modified the script.
I then thought there is no need to move the source over to the new directory, I can just say in the new script where to locate the c source files in the old directory.
The new directory will have the compiled executable, plus each file translated into some other language such as c to opencl.
Now each c source file could have path in the new script, but there are about 80 files. That seems a lot of uneeded work. Is there away to tell the compiler where to find the files in the old directory without giving a path heading to each file?
Any help appreciated.
I have Centos 6.5, 64 bit.