Optionally build integer-based routines for FSK tone decoding (but default
[asterisk/asterisk.git] / build_tools / make_version_c
1 #!/bin/sh
2 if [ ! -f ../.flavor ]; then
3     EXTRA=""
4 else
5     aadkver=`cat ../.version`
6     aadkflavor=`cat ../.flavor`
7     EXTRA=" (${aadkflavor} ${aadkver})"
8 fi
9 cat << END
10 /*
11  * version.c
12  * Automatically generated
13  */
14
15 #include "asterisk.h"
16
17 #include "asterisk/ast_version.h"
18
19 static const char asterisk_version[] = "${ASTERISKVERSION}${EXTRA}";
20
21 static const char asterisk_version_num[] = "${ASTERISKVERSIONNUM}";
22
23 const char *ast_get_version(void)
24 {
25         return asterisk_version;
26 }
27
28 const char *ast_get_version_num(void)
29 {
30         return asterisk_version_num;
31 }
32
33 END