Rename version macro definition.
This commit is contained in:
parent
5056ae89b7
commit
5dce7eb912
4
Makefile
4
Makefile
@ -2,9 +2,9 @@ VERSION = 1.0.0
|
|||||||
|
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CFLAGS ?= -g
|
CFLAGS ?= -g
|
||||||
CFLAGS += -W -Wall -pedantic -ansi -std=c99 -DTS_VERSION=\"$(VERSION)\"
|
CFLAGS += -W -Wall -pedantic -ansi -std=c99 -DVERSION=\"$(VERSION)\"
|
||||||
|
|
||||||
# OS X installs ncurses with wide character support, but not as "libncurses"
|
# OS X installs ncurses with wide character support, but not as "libncurses".
|
||||||
ifeq ($(shell uname -s),Darwin)
|
ifeq ($(shell uname -s),Darwin)
|
||||||
LDFLAGS += -lncurses
|
LDFLAGS += -lncurses
|
||||||
else
|
else
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#ifndef TS_VERSION
|
#ifndef VERSION
|
||||||
#define TS_VERSION "n/a"
|
#define VERSION "n/a"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *program_name;
|
const char *program_name;
|
||||||
@ -127,5 +127,5 @@ void usage(const char *program_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void version() {
|
void version() {
|
||||||
printf("%s\n", TS_VERSION);
|
printf("%s\n", VERSION);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user