Hi
I have pulled out some common function that I invariably use in my DS apps and I want to make a static library of these which I will call and link to in future apps. I have a couple of questions about the Makefiles I want to setup:
1. The makefile I and currently using to build this static library tries to build a full DS app. This, of course, fails at link time due to a missing main() etc. How do I change the makefile to compile and then archive the objects (rather than compile and link them)?
2. I always want to build 2 versions of my library that depend upon a pre-processor value (I use a #ifdef in the source). How to I: a) setup the makefile to produce 2 builds of the library, and b) define the pre-processor value that will be seen by the #ifdef in the code at compile time?
My current Makefile looks like this:
ARM7_SELECTED = ARM7_MP3_DSWIFI
BUILD := build
SOURCES := source gfx/bin
INCLUDES := source build gfx
MAKEFILE_VER := ver2
include C:\devkitPro\PAlib\lib\PA_Makefile
Thanks.
Static library makefile
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
-
- Posts: 2
- Joined: Sun Feb 20, 2011 6:43 pm
Re: Static library makefile
The static library I am trying to create does not use PALib. The reference in the current makefile to PALib is just because that was the makefile I happened to choose when I attempted to create a library.
I would be grateful for some help with my makefile issues (I appreciate the current makefile was not a good choose).
Thanks
I would be grateful for some help with my makefile issues (I appreciate the current makefile was not a good choose).
Thanks
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Static library makefile
Then I strongly suggest you remove PAlib from your install completely. Ideally delete the whole devkitPro folder and reinstall from scratch - unfortunately we've found that PAlib users tend to have all sorts of inappropriate things in their installs which interfere with the correct functioning of the toolchain.
devkitPro provide a template for an arm9 library found in the template folder of the examples, named arm9lib.
devkitPro provide a template for an arm9 library found in the template folder of the examples, named arm9lib.
Who is online
Users browsing this forum: Semrush [Bot] and 2 guests