Page 1 of 1
Adding additional libraries/includes to makefile
Posted: Sat Feb 17, 2024 11:00 pm
by gojax
Re: Adding additional libraries/includes to makefile
Posted: Tue Feb 20, 2024 12:47 am
by WinterMute
We'd need a lot more information to provide useful assistance tbh. Like what specifically these libraries are and what buildsystem they use normally.
Generally additional libraries should be compiled separately to your main project which should, assuming the library has a sensible build system, produce include & lib folders containing the headers & library proper. Once you've done that you can then add the top level containing those include & lib folders to LIBDIRS in the Makefile here
https://github.com/devkitPro/3ds-exampl ... le#L62-L66
Trying to shoehorn everything into your project so it's built by one of our example Makefiles is nearly always a terrible idea and copying files from other projects into yours will leave you with something that's incredibly difficult to maintain as and when those other projects get updated.
I should also probably mention that not all libraries are suitable for use on a 3DS and for some of them no amount of massaging will get them to work reasonably. An original 3DS runs at 268MHz and a new 3DS can be run at 804MHz - a far cry from the multi core multi GHz machines that are modern desktops & laptops.
Re: Adding additional libraries/includes to makefile
Posted: Fri Aug 23, 2024 11:17 pm
by gojax
Thanks for your response; I thought I replied months ago but I guess not...
Anyways, The libraries I was intending to add were relay graphs and autogenerated files cross-compiled for ARM cortex A-9 (the 3ds cpu core), for the purposes of running machine learning model inference. I was able to do this successfully on the 3ds by adapting a tutorial i found.
Here's the tutorial: https://tvm.apache.org/docs/how_to/work ... m_ide.html
Here's a video of the 3ds running inference: https://www.youtube.com/watch?v=OHeZvUHVpf4
I was eventually able to include the libraries in the makefile like you suggested, but at the time of your response I was so inexperienced as to not know how to use a file path in my code.
Here is what my makefile looks like now, for anyone else who might need it: