Re: Checking if code is compiled for Zephyr


flaviosantes@...
 

Hello,

__ZEPHYR__ ?

https://gerrit.zephyrproject.org/r/#/c/7470/2

Regards,
Flavio

--------------------------------------------

On Tue, 3/7/17, Marcus Shawcroft <marcus.shawcroft@gmail.com> wrote:

Subject: Re: [Zephyr-devel] Checking if code is compiled for Zephyr
To: "Paul Sokolovsky" <paul.sokolovsky@linaro.org>
Cc: "devel@lists.zephyrproject.org" <devel@lists.zephyrproject.org>
Date: Tuesday, March 7, 2017, 8:38 AM

On 7 March 2017 at 14:35,
Paul Sokolovsky <paul.sokolovsky@linaro.org>
wrote:
> Hello,
>
> I'm trying to #ifdef a part of
cross-platform code for Zephyr, and I
>
didn't find a clear, self-describing way to do so. Am I
missing
> something? Can we have
something like __ZEPHYR__, _ZEPHYR of whatever
> preprocessor macro to check for?

The toplevel Makefile
hardwires:

-D__ZEPHYR__=1

I don't know if that symbol is documented
somewhere, but it would be
nice if it
was.


Cheers
/Marcus
_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel

Join devel@lists.zephyrproject.org to automatically receive all group messages.