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.

version.c 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. /**
  30. * Create wide-character version of string
  31. *
  32. * @v string String
  33. * @ret wstring Wide-character version of string
  34. */
  35. #define WSTRING( string ) _WSTRING ( string )
  36. #define _WSTRING( string ) L ## string
  37. /** Version number feature */
  38. FEATURE_VERSION ( VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH );
  39. /** Build timestamp (generated by linker) */
  40. extern char _build_timestamp[];
  41. /** Build ID (generated by linker) */
  42. extern char _build_id[];
  43. /** Build timestamp */
  44. unsigned long build_timestamp = ( ( unsigned long ) _build_timestamp );
  45. /** Build ID */
  46. unsigned long build_id = ( ( unsigned long ) _build_id );
  47. /** Product major version */
  48. const int product_major_version = VERSION_MAJOR;
  49. /** Product minor version */
  50. const int product_minor_version = VERSION_MINOR;
  51. /** Product version string */
  52. const char product_version[] = VERSION;
  53. /** Product name string */
  54. const char product_name[] = PRODUCT_NAME;
  55. /** Product short name string */
  56. const char product_short_name[] = PRODUCT_SHORT_NAME;
  57. /** Build name string */
  58. const char build_name[] = BUILD_NAME;
  59. /** Wide-character product version string */
  60. const wchar_t product_wversion[] = WSTRING ( VERSION );
  61. /** Wide-character product name string */
  62. const wchar_t product_wname[] = WSTRING ( PRODUCT_NAME );
  63. /** Wide-character product short name string */
  64. const wchar_t product_short_wname[] = WSTRING ( PRODUCT_SHORT_NAME );
  65. /** Wide-character build name string */
  66. const wchar_t build_wname[] = WSTRING ( BUILD_NAME );
  67. /** Copy of build name string within ".prefix" */
  68. const char build_name_prefix[] __attribute__ (( section ( ".prefix.name" ) ))
  69. = BUILD_NAME;