mirror of
https://github.com/tomasriveral/NoteWrapper.git
synced 2026-08-12 02:18:38 +02:00
Fix: version flag is now set with compiler flag
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
CC := gcc
|
CC := gcc
|
||||||
|
|
||||||
|
VERSION := $(shell git describe --tags --always --dirty)
|
||||||
|
|
||||||
CFLAGS := -Wall -Wextra -O2 \
|
CFLAGS := -Wall -Wextra -O2 \
|
||||||
|
-DVERSION=\"$(VERSION)\" \
|
||||||
$(shell pkg-config --cflags libcjson ncurses)
|
$(shell pkg-config --cflags libcjson ncurses)
|
||||||
|
|
||||||
LDFLAGS := $(shell pkg-config --libs libcjson ncurses)
|
LDFLAGS := $(shell pkg-config --libs libcjson ncurses)
|
||||||
|
|||||||
+1
-1
@@ -322,7 +322,7 @@ for (int i = 1; i < argc; i++) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
} else if (strcmp(arg, "--version") == 0) {
|
} else if (strcmp(arg, "--version") == 0) {
|
||||||
printf("NoteWrapper version 1.0\n");
|
printf("NoteWrapper %s\n", VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ftw.h>
|
#include <ftw.h>
|
||||||
|
#ifndef VERSION
|
||||||
|
#define VERSION "dev"
|
||||||
|
#endif
|
||||||
#define BUFFER_SIZE 256 //standard buffer size.
|
#define BUFFER_SIZE 256 //standard buffer size.
|
||||||
// the three supported values are "daily" "weekly" and "monthly" (for months we use the avarage lenght of a month in a non leap year). All values were calculated on my loyal TI-30 ECO RS
|
// the three supported values are "daily" "weekly" and "monthly" (for months we use the avarage lenght of a month in a non leap year). All values were calculated on my loyal TI-30 ECO RS
|
||||||
#define DAILY 86400
|
#define DAILY 86400
|
||||||
|
|||||||
Reference in New Issue
Block a user