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. Thanks. jyunker |
Quote:
|
Why use separate directories
It will generate a lot of extra files in addtion to just the one executable. I want to keep everything separate for my sanity.
I have several rewrites planed and do not want so many rewritten files all in one directory - confusing. I thought this was a good way to keep things separate. Just do one rewrite per directory. Thanks R, jyunker |
makefiles are all relative $PATH
just use a copy of the folder as a build folder or port it to use cmake cmake defaults to using a build folder in one higher up folder |
All times are GMT -5. The time now is 12:10 AM. |