buildinfo.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * This program is free software; you can redistribute it and/or
  3. * modify it under the terms of the GNU General Public License
  4. * as published by the Free Software Foundation; either version 2
  5. * of the License, or (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software Foundation,
  14. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. *
  16. * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
  17. * All rights reserved.
  18. */
  19. /** \file
  20. * \ingroup creator
  21. */
  22. #ifdef WITH_BUILDINFO_HEADER
  23. # include "buildinfo.h"
  24. #endif
  25. #ifdef BUILD_DATE
  26. extern char build_date[];
  27. extern char build_time[];
  28. extern char build_hash[];
  29. extern unsigned long build_commit_timestamp;
  30. extern char build_commit_date[];
  31. extern char build_commit_time[];
  32. extern char build_branch[];
  33. extern char build_platform[];
  34. extern char build_type[];
  35. extern char build_cflags[];
  36. extern char build_cxxflags[];
  37. extern char build_linkflags[];
  38. extern char build_system[];
  39. /* Currently only these are defined in the header. */
  40. char build_date[] = BUILD_DATE;
  41. char build_time[] = BUILD_TIME;
  42. char build_hash[] = BUILD_HASH;
  43. unsigned long build_commit_timestamp = BUILD_COMMIT_TIMESTAMP;
  44. char build_commit_date[16] = "\0";
  45. char build_commit_time[16] = "\0";
  46. char build_branch[] = BUILD_BRANCH;
  47. char build_platform[] = BUILD_PLATFORM;
  48. char build_type[] = BUILD_TYPE;
  49. # ifdef BUILD_CFLAGS
  50. char build_cflags[] = BUILD_CFLAGS;
  51. char build_cxxflags[] = BUILD_CXXFLAGS;
  52. char build_linkflags[] = BUILD_LINKFLAGS;
  53. char build_system[] = BUILD_SYSTEM;
  54. # else
  55. char build_cflags[] = "unmaintained buildsystem alert!";
  56. char build_cxxflags[] = "unmaintained buildsystem alert!";
  57. char build_linkflags[] = "unmaintained buildsystem alert!";
  58. char build_system[] = "unmaintained buildsystem alert!";
  59. # endif
  60. #endif // BUILD_DATE