You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Copyright (C) 2012 Michael Brown <mbrown@fensystems.co.uk>.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of the
  7. * License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * 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., 51 Franklin Street, Fifth Floor, Boston, MA
  17. * 02110-1301, USA.
  18. */
  19. FILE_LICENCE ( GPL2_OR_LATER );
  20. /** @file
  21. *
  22. * Version number
  23. *
  24. */
  25. #include <wchar.h>
  26. #include <ipxe/features.h>
  27. #include <ipxe/version.h>
  28. #include <config/general.h>
  29. #include <config/branding.h>
  30. /**
  31. * Create wide-character version of string
  32. *
  33. * @v string String
  34. * @ret wstring Wide-character version of string
  35. */
  36. #define WSTRING( string ) _WSTRING ( string )
  37. #define _WSTRING( string ) L ## string
  38. /** Version number feature */
  39. FEATURE_VERSION ( VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
  40. /** Build timestamp (generated by linker) */
  41. extern char _build_timestamp[];
  42. /** Build ID (generated by linker) */
  43. extern char _build_id[];
  44. /** Build timestamp */
  45. unsigned long build_timestamp = ( ( unsigned long ) _build_timestamp );
  46. /** Build ID */
  47. unsigned long build_id = ( ( unsigned long ) _build_id );
  48. /** Product major version */
  49. const int product_major_version = VERSION_MAJOR;
  50. /** Product minor version */
  51. const int product_minor_version = VERSION_MINOR;
  52. /** Product version string */
  53. const char product_version[] = VERSION;
  54. /** Product name string */
  55. const char product_name[] = PRODUCT_NAME;
  56. /** Product short name string */
  57. const char product_short_name[] = PRODUCT_SHORT_NAME;
  58. /** Build name string */
  59. const char build_name[] = BUILD_NAME;
  60. /** Wide-character product version string */
  61. const wchar_t product_wversion[] = WSTRING ( VERSION );
  62. /** Wide-character product name string */
  63. const wchar_t product_wname[] = WSTRING ( PRODUCT_NAME );
  64. /** Wide-character product short name string */
  65. const wchar_t product_short_wname[] = WSTRING ( PRODUCT_SHORT_NAME );
  66. /** Wide-character build name string */
  67. const wchar_t build_wname[] = WSTRING ( BUILD_NAME );
  68. /** Copy of build name string within ".prefix" */
  69. const char build_name_prefix[] __attribute__ (( section ( ".prefix.name" ) ))
  70. = BUILD_NAME;