Skip to content

Commit

Permalink
Added support for dynamic versioning; added gitignore for bin directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
bweir committed Feb 8, 2015
1 parent f905a46 commit 3834573
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
*.i*86
*.x86_64
*.hex

bin/
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
4 changes: 2 additions & 2 deletions p1load.c
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand All @@ -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\
Expand Down

0 comments on commit 3834573

Please sign in to comment.