From 47e246868137e64866bbf6f7032065e93904a405 Mon Sep 17 00:00:00 2001 From: Kevin Pearson Date: Wed, 26 Apr 2017 10:07:00 -0400 Subject: [PATCH] Unify version string Specified version string in makefile will now propogate to VERSION as a macro appended to CFLAGS. Cleaned up version string, quotes not necessary when specifying major/minor/micro, though this is purely cosmetic. Signed-off-by: Kevin Pearson --- makefile | 7 ++++--- src/helpers/help.cpp | 4 +--- src/helpers/help.h | 4 ++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 719c410..cd0b179 100644 --- a/makefile +++ b/makefile @@ -16,10 +16,11 @@ includedir?=$(prefix)/include # Program & versioning information PROGN=g810-led -MAJOR="0" -MINOR="2" -MICRO="0" +MAJOR=0 +MINOR=2 +MICRO=0 +CFLAGS+=-DVERSION=\"$(MAJOR).$(MINOR).$(MICRO)\" APPSRCS=src/main.cpp src/helpers/*.cpp src/helpers/*.h LIBSRCS=src/classes/*.cpp src/classes/*.h diff --git a/src/helpers/help.cpp b/src/helpers/help.cpp index c77472f..8c33944 100644 --- a/src/helpers/help.cpp +++ b/src/helpers/help.cpp @@ -8,13 +8,11 @@ using namespace std; namespace help { - string version = "0.2.0"; - void usage(char *arg0) { string cmdName = utils::getCmdName(arg0); cout<