projects
/
hdmi-switcher.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
113218b
)
Add version constant
author
Cameron Ball
<c.ball1729@gmail.com>
Thu, 26 Mar 2015 08:45:00 +0000
(08:45 +0000)
committer
Cameron Ball
<c.ball1729@gmail.com>
Thu, 26 Mar 2015 08:45:00 +0000
(08:45 +0000)
Makefile
patch
|
blob
|
history
main.c
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index
9c6d836
..
4b4056a
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,4
+1,5
@@
-CC = gcc -Wall
+GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags)
+CC = gcc -Wall -DVERSION=\"$(GIT_VERSION)\"
lib_inih := lib/inih
libs := $(lib_inih)
diff --git
a/main.c
b/main.c
index
5524e79
..
35519e1
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-108,6
+108,7
@@
int read_button()
int main (void)
{
+ printf("hdmi-switcher %s\n", VERSION);
init_config(&config);
init_gpio();
switch_state = config.default_switch_state;