Thanks to ninja-build, all we need to do is to run one command [1] and
we can get a compile_commands.json from a ninja.build file.
This commit adds a new argument (-j or --compdb) to let users generate a
compile_commands.json file.
[1] https://ninja-build.org/manual.html#_extra_tools
The only example in the repository was using files included in the ARM9
binary, which isn't a very useful thing to do in games when they start
growing.
The old code would only let developers use the default ARM7 core, but
BlocksDS now comes with several builds of the ARM7 core with different
settings, so it's useful to be able to pick which one to use.
This commit is equivalent to the following commit of the BlocksDS SDK
repository:
afb89fede0
Using g++ to link object files automatically links the STD of C++. It looks
like this library is linked outside of the start/end-group commands with
the other libraries, which causes undefined reference errors when linking
C++ projects that use standard library functions that interface with the
OS, like `fopen()`.
Thanks to @lifehackerhansol for the report and testing the fix.
Normally, you require to add the DSL files to a filesystem object so that
ArchitectDS generates all rules correctly. The new function allows you to
build a dynamic library outside of the source tree by not requiring any
other object to generate the file with all required build rules.
This is required because in some cases there are intermediate files between
the source files and the target files. The target files need to be added to
the filesystem image, but the source and intermediate files don't. With a
temporary path, intermediate files can be saved there.
This is needed for GL2D sprite sets stored in NitroFS, which will be
implemented in a future commit.
This switches the `-I` includes to `-isystem `. Doing this suppresses
warnings from libnds and other includes which can be rather annoying
when trying to debug a project's code.