[Listener] print_version(): print version number
Use git describe to generate a version label. One can also specify a label: make OWLPS_VERSION=v3.14alpha
This commit is contained in:
parent
273c2adfc7
commit
c23bddffae
|
@ -1,3 +1,8 @@
|
|||
# Source version
|
||||
ifndef OWLPS_VERSION
|
||||
OWLPS_VERSION = $$(git describe || echo 'UNKNOWN_VERSION')
|
||||
endif
|
||||
|
||||
# Répertoire d'installation
|
||||
PREFIX=/usr/local
|
||||
INSTALL_DIR= $(PREFIX)/sbin
|
||||
|
@ -27,7 +32,8 @@ CFLAGS = -O2 -Wall -Wextra -Wstrict-prototypes \
|
|||
DEPFLAGS = -MMD
|
||||
XCFLAGS = $(CFLAGS) $(DEPFLAGS) $(WARN) $(HEADERS)
|
||||
PICFLAG = -fPIC
|
||||
OWLPSFLAGS = -D USE_CONFIG_FILE -lconfuse -D USE_PTHREAD -pthread
|
||||
OWLPSFLAGS = -D OWLPS_VERSION=\"$(OWLPS_VERSION)\" \
|
||||
-D USE_CONFIG_FILE -lconfuse -D USE_PTHREAD -pthread
|
||||
LIBS = -L$(LIBOWLPS_DIR) -lowlps \
|
||||
-L$(LIBOWLPSCLIENT_DIR) -lowlps-client \
|
||||
-lpcap
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
# Source version
|
||||
ifndef OWLPS_VERSION
|
||||
OWLPS_VERSION = $$(git describe)
|
||||
endif
|
||||
|
||||
# Emplacement de la suite de cross-compilation
|
||||
TOOLCHAIN_PREFIX = $$HOME/openwrt/atheros/8.09
|
||||
TOOLCHAIN_BIN = $(TOOLCHAIN_PREFIX)/staging_dir/toolchain-mips_gcc4.1.2/bin
|
||||
|
@ -36,7 +41,8 @@ LOWLPSCLIENTA = $(LIBOWLPSCLIENT_DIR)/libowlps-client.a
|
|||
LIBS = -lpcap -liw -lm $(LOWLPSCLIENTA)
|
||||
LATHEROS = -L$(TOOLCHAIN_USR)/lib -L$(TOOLCHAIN_USR_2)/lib
|
||||
IATHEROS = -I$(TOOLCHAIN_USR)/include -I$(TOOLCHAIN_USR_2)/include
|
||||
OWLPSFLAGS = -D USE_PTHREAD -pthread
|
||||
OWLPSFLAGS = -D OWLPS_VERSION=\"$(OWLPS_VERSION)\" \
|
||||
-D USE_PTHREAD -pthread
|
||||
#OWLPSFLAGS += -D USE_CONFIG_FILE -lconfuse
|
||||
LDFLAGS = $(OWLPSFLAGS) $(LIBS)
|
||||
|
||||
|
|
|
@ -1346,7 +1346,7 @@ void print_usage()
|
|||
|
||||
"Main options:\n"
|
||||
"\t-h\t\tPrint this help.\n"
|
||||
"\t-V\t\tShow version.\n"
|
||||
"\t-V\t\tShow version information.\n"
|
||||
"\t-f config_file\tUse 'config_file' instead of the default"
|
||||
" configuration file (%s). Available only if program was"
|
||||
" compiled with libconfuse.\n"
|
||||
|
@ -1411,12 +1411,18 @@ void print_usage()
|
|||
|
||||
void print_version()
|
||||
{
|
||||
printf("This is OWLPS Listener, part of the Open Wireless Positioning"
|
||||
printf("This is OwlPS Listener, part of the Open Wireless Positioning"
|
||||
" System project.\n"
|
||||
"\n"
|
||||
"Version: %s.\n"
|
||||
"Compilation-time options:\n"
|
||||
"\tSupport for POSIX threads: %s.\n"
|
||||
"\tSupport for configuration file (libconfuse): %s.\n",
|
||||
#ifdef OWLPS_VERSION
|
||||
OWLPS_VERSION
|
||||
#else // OWLPS_VERSION
|
||||
"unknown version"
|
||||
#endif // OWLPS_VERSION
|
||||
,
|
||||
#ifdef USE_PTHREAD
|
||||
"YES"
|
||||
#else // USE_PTHREAD
|
||||
|
|
Loading…
Reference in New Issue