Added support for dynamic versioning; added gitignore for bin directory.
This commit is contained in:
parent
f905a46461
commit
3834573f5e
2
.gitignore
vendored
2
.gitignore
vendored
@ -27,3 +27,5 @@
|
||||
*.i*86
|
||||
*.x86_64
|
||||
*.hex
|
||||
|
||||
bin/
|
||||
|
7
Makefile
7
Makefile
@ -11,6 +11,13 @@ $(OBJDIR)/ploader.o
|
||||
|
||||
OS?=macosx
|
||||
|
||||
VERSION := $(shell git describe --tags --long 2>/dev/null)
|
||||
ifeq ($(VERSION),)
|
||||
VERSION := '0.0.0'
|
||||
endif
|
||||
|
||||
CFLAGS += -D'VERSION="$(VERSION)"'
|
||||
|
||||
ifeq ($(OS),linux)
|
||||
CFLAGS+=-DLINUX
|
||||
EXT=
|
||||
|
4
p1load.c
4
p1load.c
@ -276,7 +276,7 @@ int main(int argc, char *argv[])
|
||||
static void Usage(void)
|
||||
{
|
||||
printf("\
|
||||
p1load - a simple loader for the propeller - version 0.010, 2015-02-08\n\
|
||||
p1load - a simple loader for the propeller - v%s, %s\n\
|
||||
usage: p1load\n\
|
||||
[ -b baud ] baud rate (default is %d)\n\
|
||||
[ -D var=val ] set variable value\n\
|
||||
@ -288,7 +288,7 @@ usage: p1load\n\
|
||||
[ -T ] enter PST-compatible terminal mode\n\
|
||||
[ -v ] verbose output\n\
|
||||
[ -? ] display a usage message and exit\n\
|
||||
file file to load\n", BAUD_RATE);
|
||||
file file to load\n", VERSION, __DATE__, BAUD_RATE);
|
||||
#ifdef RASPBERRY_PI
|
||||
printf("\
|
||||
\n\
|
||||
|
Loading…
Reference in New Issue
Block a user