platform #ifdef

Post Reply
zigg
Posts: 28
Joined: Wed Jul 01, 2009 2:42 pm

platform #ifdef

Post by zigg » Thu Aug 06, 2009 6:11 pm

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

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: platform #ifdef

Post by elhobbs » Thu Aug 06, 2009 8:38 pm

the example makefiles define ARM9 and ARM7 - as you can see in your CFLAGS example.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests