core-lightning/common/version.c
Rusty Russell 5e865ce42b Makefile: unify generated files definition.
We change gen_ to _gen, because filtering on gen_% doesn't work if they're
in subdirectories :(

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-10-22 12:14:34 +10:30

20 lines
344 B
C

#include "version.h"
#include <stdio.h>
/* Only common/version.c can safely include this. */
# include "version_gen.h"
const char *version(void)
{
return VERSION;
}
char *version_and_exit(const void *unused UNUSED)
{
printf("%s\n", VERSION);
if (BUILD_FEATURES[0]) {
printf("Built with features: %s\n", BUILD_FEATURES);
}
exit(0);
}