More BMK tweaks - testing needed
BlitzMax Forums/BlitzMax Module Tweaks/More BMK tweaks - testing needed
| ||
Hi folks :-) Wonder if anyone would like to test my latest bmk tweaks. Essentially, this adds support for specifying/overriding CC and LD options when building modules. You can download zipped source from HERE. How it works ModuleInfo now understands two new types. CC_OPTS and LD_OPTS. CC_OPTS are applied during the compilation of the module C/C++ files. LD_OPTS are applied during the linking of an application that uses the module. Example: Module Cool.MyModule ModuleInfo "CC_OPTS: -fexceptions" ModuleInfo "CC_OPTS: -DSOMETHINGELSE" ModuleInfo "LD_OPTS: -L%PWD%/lib" ModuleInfo "LD_OPTS: -lcheese" The "-fexceptions" option will override the default compiler option of "-fno-exceptions". This is useful for compiling C++ libraries that require exceptions to be enabled. The "-DSOMETHINGELSE" option passes a preprocessor definition called SOMETHINGELSE. The LD options only come into effect when you compile an application using the module. -L%PWD%/lib will be translated into -L/full/path/of/module/lib, which is useful when you want to link to a .a file that is located with your module. You can of course use full-paths here too. For example -LC:\stuff\libs would also be a valid option. The -lcheese option attempts to link to a file called libcheese.ext, where ext is platform dependent. ie. on Windows, it would likely be libcheese.a, and on linux, libcheese.so. This bmk is backwards compatible with using Import "-l...." statements. I'm sure you can figure out the rest ;-) Remember to backup your bmk before using any new ones! |
| ||
would you consider including an option to increase the default about of memory fasm uses as the standard bmk stands it cant assemble large source files that are in debug mode... (I did a quick hack in the bug fix forum, but the folks at brl have seen fit to ignore it, so I can only assume they dont see it as an issue...?) What happens if you need compiler options but you're not developing a module? |
| ||
would you consider including an option to increase the default about of memory fasm uses No problems adding your 32meg hard-coded change. Can't see it affects anything that doesn't need that much, and benefits those that do - not that I've ever reached the default limit. What happens if you need compiler options but you're not developing a module? Nothing with these changes :-) It's not on my list of things to do - any C/C++ I need are all module related. For example, with this new bmk, I can now compile the ibpp library source, which I couldn't before. DBFirebird soon... hopefully. |
| ||
Well its not just module writers that need this functionality I'd really encourage making a separate keyword so its of benefit to applications using mixed bmx and cpp sources |
| ||
Just trying to help, is all. You'd need to speak to Mark about changes to bcc :-) |
| ||
it could be just put in a comment for the time being 'CC_OPTS: -fexceptions" 'CC_OPTS: -DSOMETHINGELSE" 'LD_OPTS: -L%PWD%/lib" 'LD_OPTS: -lcheese" something like this has been needed for ages and lets face it the development speed @ BRL isn't exactly stella |
| ||
ooooh! i might actually be able to build Irrlicht directly into a mod with these changes. very cool stuff Brucey thank you. |