Hi,
Does someone know if it is possible to make the 'make' tool "automagically" find header files dependencies (.h files), ie. when I include "xxx.h" in "xxx.cpp" and I edit "xxx.h" 'make' should recompile "xxx.cpp". It should somehow parse the .cpp/.c files and find all dependencies to .h files. The same applied to .asm files included in other .asm files.
make dependencies
Note the trick I mentioned in that other posts depends on cpp (the preprocessor), not necessarily gcc (the C compiler). For example, if you use GNU as as assembler, and cpp as preprocessor (i.e., #include ...), it works just as well.
If your assembler of choice doesn't offer something like this, it might be an idea to tweak your toolchain so that you use cpp for handling the includes, instead of using your assembler's native include functionality.
If your assembler of choice doesn't offer something like this, it might be an idea to tweak your toolchain so that you use cpp for handling the includes, instead of using your assembler's native include functionality.
Every good solution is obvious once you've found it.
Thanks, I will try it.
I try to make my project build on both Linux (GCC) and Windows (DJGPP). There has been some challenges. To get the above code to work with DJGPP/Windows could be one as well, but I will look into it.
I'm currently using NASM. I like the syntax better. But maybe I could preprocess the .asm files with 'cpp'. On the other hand I'm not editing the .asm files as often as .cpp files, so it shouldn't be a problem.
I try to make my project build on both Linux (GCC) and Windows (DJGPP). There has been some challenges. To get the above code to work with DJGPP/Windows could be one as well, but I will look into it.
I'm currently using NASM. I like the syntax better. But maybe I could preprocess the .asm files with 'cpp'. On the other hand I'm not editing the .asm files as often as .cpp files, so it shouldn't be a problem.