1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
/*
* Copyright (c) 2006-2010 Trusted Logic S.A.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#ifndef __S_VERSION_H__
#define __S_VERSION_H__
/*
* Usage: define S_VERSION_BUILD on the compiler's command line.
*
* Then, you get:
* - S_VERSION_MAIN "X.Y"
* - S_VERSION_BUILD = 0 if S_VERSION_BUILD not defined or empty
* - S_VERSION_STRING = "TFO[O][P] X.Y.N " or "TFO[O][P] X.Y.N D "
* - S_VERSION_RESOURCE = X,Y,0,N
*/
#ifdef S_VERSION_BUILD
/* TRICK: detect if S_VERSION is defined but empty */
#if 0 == S_VERSION_BUILD-0
#undef S_VERSION_BUILD
#define S_VERSION_BUILD 0
#endif
#else
/* S_VERSION_BUILD is not defined */
#define S_VERSION_BUILD 0
#endif
#define __STRINGIFY(X) #X
#define __STRINGIFY2(X) __STRINGIFY(X)
#if !defined(NDEBUG) || defined(_DEBUG)
#define S_VERSION_VARIANT_DEBUG "D"
#else
#define S_VERSION_VARIANT_DEBUG " "
#endif
#ifdef STANDARD
#define S_VERSION_VARIANT_STANDARD "S"
#else
#define S_VERSION_VARIANT_STANDARD " "
#endif
#define S_VERSION_VARIANT S_VERSION_VARIANT_STANDARD S_VERSION_VARIANT_DEBUG " "
/*
* This version number must be updated for each new release
*/
#define S_VERSION_MAIN "08.01"
#define S_VERSION_RESOURCE 8,1,0,S_VERSION_BUILD
/*
* Products Versioning
*/
#if defined(WIN32)
/* Win32 Simulator and all Win32 Side Components */
#define PRODUCT_NAME "TFOWX"
#elif defined(__ANDROID32__)
#define PRODUCT_NAME "UNKWN"
#elif defined(LINUX)
#if defined(__ARM_EABI__)
/* arm architecture -> Cortex-A8 */
#define PRODUCT_NAME "TFOLB"
#else
/* ix86 architecture -> Linux Simulator and all Linux Side Components */
#define PRODUCT_NAME "TFOLX"
#endif
#else
/* Not OS specififc -> Cortex-A8 Secure Binary */
#define PRODUCT_NAME "TFOXB"
#endif
#define S_VERSION_STRING \
PRODUCT_NAME S_VERSION_MAIN "." \
__STRINGIFY2(S_VERSION_BUILD) " " \
S_VERSION_VARIANT
#endif /* __S_VERSION_H__ */
|