Use git describe for the version string
This commit is contained in:
parent
c8c69c10ce
commit
aa0f1992e3
3 changed files with 6 additions and 6 deletions
4
Makefile
4
Makefile
|
@ -1,6 +1,6 @@
|
||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
CFLAGS += -Wall -g
|
CFLAGS += -Wall -g -DNMRPFLASH_VERSION=\"$(shell git describe --always)\"
|
||||||
LIBS = -lpcap
|
LIBS = -lpcap
|
||||||
|
|
||||||
.PHONY: clean install release release/osx release/linux
|
.PHONY: clean install release release/osx release/linux
|
||||||
|
@ -28,8 +28,10 @@ install: nmrp-flash
|
||||||
|
|
||||||
release/osx:
|
release/osx:
|
||||||
make release CFLAGS="-arch i686 -arch x86_64"
|
make release CFLAGS="-arch i686 -arch x86_64"
|
||||||
|
cp nmrp-flash binaries/osx/
|
||||||
|
|
||||||
release/linux: release
|
release/linux: release
|
||||||
|
cp nmrp-flash binaries/linux/
|
||||||
|
|
||||||
release: clean nmrp-flash
|
release: clean nmrp-flash
|
||||||
strip nmrp-flash
|
strip nmrp-flash
|
||||||
|
|
6
main.c
6
main.c
|
@ -57,11 +57,11 @@ void usage(FILE *fp)
|
||||||
"C:\\> nmrp-flash.exe -i net0 -a 192.168.1.254 -f firmware.bin\n"
|
"C:\\> nmrp-flash.exe -i net0 -a 192.168.1.254 -f firmware.bin\n"
|
||||||
#endif
|
#endif
|
||||||
"\n"
|
"\n"
|
||||||
"nmrp-flash v%s, Copyright (C) 2016 Joseph C. Lehner\n"
|
"nmrp-flash %s, Copyright (C) 2016 Joseph C. Lehner\n"
|
||||||
"nmrp-flash is free software, licensed under the GNU GPLv3.\n"
|
"nmrp-flash is free software, licensed under the GNU GPLv3.\n"
|
||||||
"Source code at https://github.com/jclehner/nmrp-flash\n"
|
"Source code at https://github.com/jclehner/nmrp-flash\n"
|
||||||
"\n",
|
"\n",
|
||||||
NMRPD_VERSION
|
NMRPFLASH_VERSION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
printf("nmrp-flash v%s\n", NMRPD_VERSION);
|
printf("nmrp-flash %s\n", NMRPFLASH_VERSION);
|
||||||
val = 0;
|
val = 0;
|
||||||
goto out;
|
goto out;
|
||||||
case 'v':
|
case 'v':
|
||||||
|
|
2
nmrpd.h
2
nmrpd.h
|
@ -44,8 +44,6 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NMRPD_VERSION "0.9"
|
|
||||||
|
|
||||||
enum nmrp_op {
|
enum nmrp_op {
|
||||||
NMRP_UPLOAD_FW = 0,
|
NMRP_UPLOAD_FW = 0,
|
||||||
NMRP_UPLOAD_ST = 1,
|
NMRP_UPLOAD_ST = 1,
|
||||||
|
|
Loading…
Add table
Reference in a new issue