1 // Copyright (c) 2012 The Bitcoin developers
2 // Distributed under the MIT/X11 software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
8 // Name of client reported in the 'version' message. Report the same name
9 // for both bitcoind and bitcoin-qt, to make it harder for attackers to
10 // target servers or GUI users specifically.
11 const std::string CLIENT_NAME("Satoshi");
13 // Client version number
15 #define CLIENT_VERSION_SUFFIX "-leveldb"
17 #define CLIENT_VERSION_SUFFIX "-bdb"
21 #if defined(__GNUC__) && defined(__INTEL_COMPILER)
22 /*code specific to linux icc compiler*/
23 #define CL_NAME "-icc"
26 /*code for GNU C compiler */
27 #define CL_NAME "-gcc"
29 /*usually has the version number in _MSC_VER*/
30 /*code specific to MSVC compiler*/
31 #define CL_NAME "-msvc"
33 /*code specific to clang compilers*/
34 #define CL_NAME "-clang"
36 /*code specific to mingw compilers*/
37 #define CL_NAME "-mingw"
39 #define CL_NAME "-genericcl"
44 // The following part of the code determines the CLIENT_BUILD variable.
45 // Several mechanisms are used for this:
46 // * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is
47 // generated by the build environment, possibly containing the output
48 // of git-describe in a macro called BUILD_DESC
49 // * secondly, if this is an exported version of the code, GIT_ARCHIVE will
50 // be defined (automatically using the export-subst git attribute), and
51 // GIT_COMMIT will contain the commit id.
52 // * then, three options exist for determining CLIENT_BUILD:
53 // * if BUILD_DESC is defined, use that literally (output of git-describe)
54 // * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit]
55 // * otherwise, use v[maj].[min].[rev].[build]-unk
56 // finally CLIENT_VERSION_SUFFIX is added
58 // First, include build.h if requested
59 #ifdef HAVE_BUILD_INFO
63 // git will put "#define GIT_ARCHIVE 1" on the next line inside archives.
66 # define GIT_COMMIT_ID "32a928e"
67 # define GIT_COMMIT_DATE "$Format:%cD"
70 #define BUILD_DESC_FROM_COMMIT(maj,min,rev,commit) \
71 "nvc-v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit
73 #define BUILD_DESC_FROM_UNKNOWN(maj,min,rev) \
74 "nvc-v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk"
78 # define BUILD_DESC BUILD_DESC_FROM_COMMIT(DISPLAY_VERSION_MAJOR, DISPLAY_VERSION_MINOR, DISPLAY_VERSION_REVISION, GIT_COMMIT_ID)
80 # define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(DISPLAY_VERSION_MAJOR, DISPLAY_VERSION_MINOR, DISPLAY_VERSION_REVISION)
85 #undef GIT_COMMIT_DATE
89 # ifdef GIT_COMMIT_DATE
90 # define BUILD_DATE GIT_COMMIT_DATE
92 # define BUILD_DATE __DATE__ ", " __TIME__
96 const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX CL_NAME);
97 const std::string CLIENT_DATE(BUILD_DATE);