Page 1 of 1

platform #ifdef

Posted: Thu Aug 06, 2009 6:11 pm
by zigg
Is there an existing define or some other construct available that I can use to select which code to use to target either the DS or my local Linux system?

I've been using my own NDS define:

Code: Select all

#ifdef NDS
    int caddrlen;			/* client address length */
#else
    socklen_t caddrlen;			/* client address length */
#endif
and setting CFLAGS in the Makefile:

Code: Select all

CFLAGS	+=	$(INCLUDE) -DARM9 -DNDS

Re: platform #ifdef

Posted: Thu Aug 06, 2009 8:38 pm
by elhobbs
the example makefiles define ARM9 and ARM7 - as you can see in your CFLAGS example.