Fixes for versioning

master
Paul Sutton 9 years ago
parent 79fc17b76e
commit 524cc20236

@ -9,6 +9,7 @@
* This file is part of the srsLTE library.
*
* srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
@ -33,7 +34,8 @@
#define SRSLTE_VERSION_PATCH @SRSLTE_VERSION_PATCH@
#define SRSLTE_VERSION @SRSLTE_VERSION@
SRSLTE_API char* srslte_get_version();
#include "srslte/config.h"
SRSLTE_API int srslte_get_version_major();
SRSLTE_API int srslte_get_version_minor();
SRSLTE_API int srslte_get_version_patch();

@ -24,20 +24,7 @@
*
*/
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#include "srslte/version.h"
#include <stdio.h>
char* srslte_get_version_string() {
char buf[32];
sprintf(buf, "%s.%s.%s",
TOSTRING(SRSLTE_VERSION_MAJOR),
TOSTRING(SRSLTE_VERSION_MINOR),
TOSTRING(SRSLTE_VERSION_PATCH));
return buf;
}
int srslte_get_version_major() {
return SRSLTE_VERSION_MAJOR;

Loading…
Cancel
Save