Merge pull request #3 from bweir/master
Added support for dynamic versioning; added gitignore for bin directory.
This commit is contained in:
commit
5864fd3db2
2
.gitignore
vendored
2
.gitignore
vendored
@ -27,3 +27,5 @@
|
|||||||
*.i*86
|
*.i*86
|
||||||
*.x86_64
|
*.x86_64
|
||||||
*.hex
|
*.hex
|
||||||
|
|
||||||
|
bin/
|
||||||
|
7
Makefile
7
Makefile
@ -11,6 +11,13 @@ $(OBJDIR)/ploader.o
|
|||||||
|
|
||||||
OS?=macosx
|
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)
|
ifeq ($(OS),linux)
|
||||||
CFLAGS+=-DLINUX
|
CFLAGS+=-DLINUX
|
||||||
EXT=
|
EXT=
|
||||||
|
4
p1load.c
4
p1load.c
@ -276,7 +276,7 @@ int main(int argc, char *argv[])
|
|||||||
static void Usage(void)
|
static void Usage(void)
|
||||||
{
|
{
|
||||||
printf("\
|
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\
|
usage: p1load\n\
|
||||||
[ -b baud ] baud rate (default is %d)\n\
|
[ -b baud ] baud rate (default is %d)\n\
|
||||||
[ -D var=val ] set variable value\n\
|
[ -D var=val ] set variable value\n\
|
||||||
@ -288,7 +288,7 @@ usage: p1load\n\
|
|||||||
[ -T ] enter PST-compatible terminal mode\n\
|
[ -T ] enter PST-compatible terminal mode\n\
|
||||||
[ -v ] verbose output\n\
|
[ -v ] verbose output\n\
|
||||||
[ -? ] display a usage message and exit\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
|
#ifdef RASPBERRY_PI
|
||||||
printf("\
|
printf("\
|
||||||
\n\
|
\n\
|
||||||
|
Loading…
Reference in New Issue
Block a user