Makefile Tool
Posted: Tue Jan 01, 2013 9:12 pm
Hello, my fellow OsDevers,
Today, I was peacefully working on my OS, when I decided to organize my code and have specific directories for different modules/system (like a folder for HAL or perhaps for API's, y'know)
And became really frustrated with makefile's and the gimmicks to make this work. Doing this manually wasn't a solution, too.
Well, then, in a matter of hours I wrote a tool (for Windows, but I assure you, it should work with Mono on Unix) that does just that - only with some features.
So, here I introduce you the Hydra Makefile Generator ( Somehow, I feel as though there is already a solution for this, and I just didn't search well enough - oh well), a console app that generates makefiles, which includes all the source files in the "source" directory (also it takes care of the dependencies from .h files). Probably the biggest feature is that it has a continuous mode, where it monitors the file-system and generates the makefile on the fly (also it monitors removed files, so if I delete ACPI.cpp it's object file will be removed as well).
It does make some assumptions that might be considered unacceptable, but they are easily fixed by modifying the source, which is - for your convenience - published under the BSD license.
It has out-of-the-box support for ASM,C,C++ but can easily be modified to include others as well.
Source is attached.
P.S. Wanna hear your guys' feedback, or at least know if this is useful.
Today, I was peacefully working on my OS, when I decided to organize my code and have specific directories for different modules/system (like a folder for HAL or perhaps for API's, y'know)
And became really frustrated with makefile's and the gimmicks to make this work. Doing this manually wasn't a solution, too.
Well, then, in a matter of hours I wrote a tool (for Windows, but I assure you, it should work with Mono on Unix) that does just that - only with some features.
So, here I introduce you the Hydra Makefile Generator ( Somehow, I feel as though there is already a solution for this, and I just didn't search well enough - oh well), a console app that generates makefiles, which includes all the source files in the "source" directory (also it takes care of the dependencies from .h files). Probably the biggest feature is that it has a continuous mode, where it monitors the file-system and generates the makefile on the fly (also it monitors removed files, so if I delete ACPI.cpp it's object file will be removed as well).
It does make some assumptions that might be considered unacceptable, but they are easily fixed by modifying the source, which is - for your convenience - published under the BSD license.
It has out-of-the-box support for ASM,C,C++ but can easily be modified to include others as well.
Source is attached.
P.S. Wanna hear your guys' feedback, or at least know if this is useful.