Sistema l'errore da me commesso in fase di conversione...
[bertos.git] / verstag.h
1 /**
2  * \file
3  * <!--
4  * Copyright 2003, 2004, 2005, 2006 Develer S.r.l. (http://www.develer.com/)
5  * Copyright 2001, 2002, 2003 by Bernardo Innocenti <bernie@codewiz.org>
6  * This file is part of DevLib - See README.devlib for information.
7  * -->
8  *
9  * \version $Id$
10  *
11  * \author Bernardo Innocenti <bernie@develer.com>
12  *
13  * \brief Declare application version strings
14  */
15 #ifndef DEVLIB_VERSTAG_H
16 #define DEVLIB_VERSTAG_H
17
18 #ifndef ARCH_CONFIG_H
19         #include "cfg/arch_config.h"
20 #endif
21
22 #define APP_NAME "Appname"
23 #define APP_DESCRIPTION "Long application name description"
24 #define APP_AUTHOR "Develer"
25 #define APP_COPYRIGHT "Copyright 2006 Develer (http://www.develer.com/)"
26
27 #if (ARCH & ARCH_FOO)
28         #define VERS_MAJOR 0
29         #define VERS_MINOR 1
30         #define VERS_REV   0
31         #define VERS_LETTER ""
32 #elif (ARCH & ARCH_BAR)
33         #define VERS_MAJOR 0
34         #define VERS_MINOR 1
35         #define VERS_REV   0
36         #define VERS_LETTER ""
37 #else
38         #error unknown architecture
39 #endif
40
41 /**
42  * If _SNAPSHOT is defined, \c VERS_TAG contains the build date
43  * date instead of a numeric version string.
44  */
45 #define _SNAPSHOT
46
47 #ifdef _DEBUG
48         #define VERS_DBG "D"
49 #else
50         #define VERS_DBG ""
51 #endif
52
53 #define __STRINGIZE(x) #x
54 #define _STRINGIZE(x) __STRINGIZE(x)
55
56 /** Build application version string (i.e.: "1.7.0") */
57 #define MAKE_VERS(maj,min,rev) _STRINGIZE(maj) "." _STRINGIZE(min) "." _STRINGIZE(rev) VERS_LETTER VERS_DBG
58 #ifdef _SNAPSHOT
59         #define VERS_TAG "snapshot" " " __DATE__ " " __TIME__ " " VERS_LETTER " " VERS_DBG
60 #else
61         #define VERS_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
62 #endif
63
64 /** Build application version string suitable for MS windows resource files (i.e.: "1, 7, 0, 1") */
65 #define MAKE_RCVERS(maj,min,rev,bld) _STRINGIZE(maj) ", " _STRINGIZE(min) ", " _STRINGIZE(rev) ", " _STRINGIZE(bld)
66 #define RCVERSION_TAG MAKE_VERS(VERS_MAJOR,VERS_MINOR,VERS_REV)
67
68 /** The revision string (contains VERS_TAG) */
69 extern const char vers_tag[];
70
71 /** Sequential build number (contains VERS_BUILD) */
72 extern const int vers_build_nr;
73 //extern const char vers_build_str[];
74
75 /** Hostname of the machine used to build this binary (contains VERS_HOST) */
76 extern const char vers_host[];
77
78 #endif /* DEVLIB_VERSTAG_H */