include/zephyr.h: Define __ZEPHYR__ if not already.

__ZEPHYR__ preprocessor macro is a way for a (cross-platform)
application to test if it's built for Zephyr. Currently it's defined
by Makefile, so if an app uses it's own build system, it won't be
available. So, define it in the standard header too to cover such
a case.

Change-Id: Id708d1f20fe3b415968ad8475da449f54ad3c3fb
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2017-03-08 12:37:57 +01:00
commit 0c6df2d55c

View file

@ -7,6 +7,14 @@
#ifndef _ZEPHYR__H
#define _ZEPHYR__H
/*
* Applications can identify whether they are built for Zephyr by
* macro below. (It may be already defined by a makefile or toolchain.)
*/
#ifndef __ZEPHYR__
#define __ZEPHYR__
#endif
#include <kernel.h>
#ifdef CONFIG_MDEF