version.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* vim: tabstop=4 shiftwidth=4 noexpandtab
  2. * This file is part of ToaruOS and is released under the terms
  3. * of the NCSA / University of Illinois License - see LICENSE.md
  4. * Copyright (C) 2011-2018 K. Lange
  5. */
  6. #include <kernel/version.h>
  7. /* Kernel name. If you change this, you're not
  8. * my friend any more. */
  9. char * __kernel_name = "toaru";
  10. /* This really shouldn't change, and if it does,
  11. * always ensure it still has the correct arguments
  12. * when used as a vsprintf() format. */
  13. char * __kernel_version_format = "%d.%d.%d-%s";
  14. /* Version numbers X.Y.Z */
  15. int __kernel_version_major = 1;
  16. int __kernel_version_minor = 8;
  17. int __kernel_version_lower = 1;
  18. /* Kernel build suffix, which doesn't necessarily
  19. * mean anything, but can be used to distinguish
  20. * between different features included while
  21. * building multiple kernels. */
  22. #ifdef KERNEL_GIT_TAG
  23. # define STR(x) #x
  24. # define STRSTR(x) STR(x)
  25. # define KERNEL_VERSION_SUFFIX STRSTR(KERNEL_GIT_TAG)
  26. #else
  27. # define KERNEL_VERSION_SUFFIX "r"
  28. #endif
  29. char * __kernel_version_suffix = KERNEL_VERSION_SUFFIX;
  30. /* The release codename. */
  31. char * __kernel_version_codename = "core";
  32. /* Build architecture (should probably not be
  33. * here as a string, but rather some sort of
  34. * preprocessor macro, or pulled from a script) */
  35. char * __kernel_arch = "i686";
  36. /* Rebuild from clean to reset these. */
  37. char * __kernel_build_date = __DATE__;
  38. char * __kernel_build_time = __TIME__;
  39. #if (defined(__GNUC__) || defined(__GNUG__)) && !(defined(__clang__) || defined(__INTEL_COMPILER))
  40. # define COMPILER_VERSION "gcc " __VERSION__
  41. #elif (defined(__clang__))
  42. # define COMPILER_VERSION "clang " __clang_version__
  43. #else
  44. # define COMPILER_VERSION "unknown-compiler how-did-you-do-that"
  45. #endif
  46. char * __kernel_compiler_version = COMPILER_VERSION;