2 * Copyright (c) 2011 Trusted Logic S.A.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 #ifndef __S_VERSION_H__
21 #define __S_VERSION_H__
24 * Usage: define S_VERSION_BUILD on the compiler's command line.
28 * - S_VERSION_PLATFORM
30 * - S_VERSION_ENG is optional
31 * - S_VERSION_PATCH is optional
32 * - S_VERSION_BUILD = 0 if S_VERSION_BUILD not defined or empty
35 #define S_VERSION_OS "A" /* "A" for all Android */
36 #define S_VERSION_PLATFORM "C" /* "C" for Tegra4 */
39 * This version number must be updated for each new release
41 #define S_VERSION_MAIN "02.01"
44 * If this is a patch or engineering version use the following
45 * defines to set the version number. Else set these values to 0.
47 #define S_VERSION_ENG 0
48 #define S_VERSION_PATCH 0
50 #ifdef S_VERSION_BUILD
51 /* TRICK: detect if S_VERSION is defined but empty */
52 #if 0 == S_VERSION_BUILD-0
53 #undef S_VERSION_BUILD
54 #define S_VERSION_BUILD 0
57 /* S_VERSION_BUILD is not defined */
58 #define S_VERSION_BUILD 0
61 #define __STRINGIFY(X) #X
62 #define __STRINGIFY2(X) __STRINGIFY(X)
64 #if S_VERSION_ENG != 0
65 #define _S_VERSION_ENG "e" __STRINGIFY2(S_VERSION_ENG)
67 #define _S_VERSION_ENG ""
70 #if S_VERSION_PATCH != 0
71 #define _S_VERSION_PATCH "p" __STRINGIFY2(S_VERSION_PATCH)
73 #define _S_VERSION_PATCH ""
76 #if !defined(NDEBUG) || defined(_DEBUG)
77 #define S_VERSION_VARIANT "D "
79 #define S_VERSION_VARIANT " "
82 #define S_VERSION_STRING \
89 "." __STRINGIFY2(S_VERSION_BUILD) " " \
92 #endif /* __S_VERSION_H__ */