Hi, I am a noob when it comes to using makefiles, so right now I am struggling to include some files in my project. Right now, this is what my include folder looks like:
When I build my project, it seems to include the files in the top-level of the include directory correctly, but how can I include the content of the folders? So far I have added some arguments to the makefile that probably work (pictured below), but the tvm folder is kind of deep, and msys2 isn't picking up code from its deepest recesses when i try to compile my project.
Is there any solution to this problem that's more elegant than copypasting all the files inside the tvm folder to the top of the include directory, or adding extra arguments for every single folder path present in tvm? I'll admit I haven't spent a TON of time on this problem, but if anyone just immediately knows how to fix this problem for me it would be nice. also have some evil smilies cuz they're speaking to me rn
Adding additional libraries/includes to makefile
Adding additional libraries/includes to makefile
- Attachments
-
- Screenshot 2024-02-17 154525.png
- my modified Makefile
- (83.6 KiB) Not downloaded yet
-
- Screenshot 2024-02-17 153836.png
- include directory
- (55.47 KiB) Not downloaded yet
-
- Site Admin
- Posts: 1863
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Adding additional libraries/includes to makefile
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.
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.
Who is online
Users browsing this forum: No registered users and 6 guests