diff --git a/base/src/core/main.cc b/base/src/core/main.cc index f032ec404..98088475c 100644 --- a/base/src/core/main.cc +++ b/base/src/core/main.cc @@ -172,7 +172,10 @@ class Core_child : public Child_policy ** Core main ** ***************/ -namespace Genode { extern bool inhibit_tracing; } +namespace Genode { + extern bool inhibit_tracing; + extern char const *version_string; +} int main() { @@ -181,7 +184,7 @@ int main() */ inhibit_tracing = true; - PINF("Genode " GENODE_VERSION); + PINF("Genode %s", Genode::version_string); PDBG("--- create local services ---"); diff --git a/base/src/core/version.cc b/base/src/core/version.cc new file mode 100644 index 000000000..fa3db8db2 --- /dev/null +++ b/base/src/core/version.cc @@ -0,0 +1,14 @@ +/* + * \brief Provide version informaion (core-only) + * \author Christian Helmuth + * \date 2014-04-11 + */ + +/* + * Copyright (C) 2014 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +namespace Genode { char const *version_string = GENODE_VERSION; } diff --git a/base/src/core/version.inc b/base/src/core/version.inc index e75f69332..3bb3e9989 100644 --- a/base/src/core/version.inc +++ b/base/src/core/version.inc @@ -13,4 +13,14 @@ GENODE_VERSION := $(shell \ || \ echo "") -CC_OPT_main += -DGENODE_VERSION="\"$(GENODE_VERSION)\"" +CC_OPT_version += -DGENODE_VERSION="\"$(GENODE_VERSION)\"" + +SRC_CC += version.cc + +vpath version.cc $(BASE_DIR)/src/core + +version.o: force_version_compilation + +force_version_compilation: + +# vi: set ft=make :