diff options
Diffstat (limited to 'security/tf_driver/s_version.h')
-rw-r--r-- | security/tf_driver/s_version.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/security/tf_driver/s_version.h b/security/tf_driver/s_version.h new file mode 100644 index 00000000000..6244d3fe7e8 --- /dev/null +++ b/security/tf_driver/s_version.h | |||
@@ -0,0 +1,92 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Trusted Logic S.A. | ||
3 | * All Rights Reserved. | ||
4 | * | ||
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. | ||
8 | * | ||
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. | ||
13 | * | ||
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, | ||
17 | * MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __S_VERSION_H__ | ||
21 | #define __S_VERSION_H__ | ||
22 | |||
23 | /* | ||
24 | * Usage: define S_VERSION_BUILD on the compiler's command line. | ||
25 | * | ||
26 | * Then set: | ||
27 | * - S_VERSION_OS | ||
28 | * - S_VERSION_PLATFORM | ||
29 | * - S_VERSION_MAIN | ||
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 | ||
33 | */ | ||
34 | |||
35 | #define S_VERSION_OS "A" /* "A" for all Android */ | ||
36 | #define S_VERSION_PLATFORM "B" /* "B" for Tegra3 */ | ||
37 | |||
38 | /* | ||
39 | * This version number must be updated for each new release | ||
40 | */ | ||
41 | #define S_VERSION_MAIN "01.03" | ||
42 | |||
43 | /* | ||
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. | ||
46 | */ | ||
47 | #define S_VERSION_ENG 0 | ||
48 | #define S_VERSION_PATCH 0 | ||
49 | |||
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 | ||
55 | #endif | ||
56 | #else | ||
57 | /* S_VERSION_BUILD is not defined */ | ||
58 | #define S_VERSION_BUILD 0 | ||
59 | #endif | ||
60 | |||
61 | #define __STRINGIFY(X) #X | ||
62 | #define __STRINGIFY2(X) __STRINGIFY(X) | ||
63 | |||
64 | #if S_VERSION_ENG != 0 | ||
65 | #define _S_VERSION_ENG "e" __STRINGIFY2(S_VERSION_ENG) | ||
66 | #else | ||
67 | #define _S_VERSION_ENG "" | ||
68 | #endif | ||
69 | |||
70 | #if S_VERSION_PATCH != 0 | ||
71 | #define _S_VERSION_PATCH "p" __STRINGIFY2(S_VERSION_PATCH) | ||
72 | #else | ||
73 | #define _S_VERSION_PATCH "" | ||
74 | #endif | ||
75 | |||
76 | #if !defined(NDEBUG) || defined(_DEBUG) | ||
77 | #define S_VERSION_VARIANT "D " | ||
78 | #else | ||
79 | #define S_VERSION_VARIANT " " | ||
80 | #endif | ||
81 | |||
82 | #define S_VERSION_STRING \ | ||
83 | "TFN" \ | ||
84 | S_VERSION_OS \ | ||
85 | S_VERSION_PLATFORM \ | ||
86 | S_VERSION_MAIN \ | ||
87 | _S_VERSION_ENG \ | ||
88 | _S_VERSION_PATCH \ | ||
89 | "." __STRINGIFY2(S_VERSION_BUILD) " " \ | ||
90 | S_VERSION_VARIANT | ||
91 | |||
92 | #endif /* __S_VERSION_H__ */ | ||