Commit 28b2170ca97893cc8fa5a2387e1bc61e95c17571
1 parent
a7d4ec49
rpiboot: Add build date and version
Capture the changelog version and git version (if available)
Showing
2 changed files
with
5 additions
and
1 deletions
Makefile
| 1 | +PKG_VER=$(shell grep rpiboot debian/changelog | head -n1 | sed 's/.*(\(.*\)).*/\1/g') | |
| 2 | +GIT_VER=$(shell git rev-parse HEAD 2>/dev/null | cut -c1-8 || echo "") | |
| 1 | 3 | rpiboot: main.c msd/bootcode.h msd/start.h msd/bootcode4.h msd/start4.h |
| 2 | - $(CC) -Wall -Wextra -g -o $@ $< `pkg-config --cflags --libs libusb-1.0` | |
| 4 | + $(CC) -Wall -Wextra -g -o $@ $< `pkg-config --cflags --libs libusb-1.0` -DGIT_VER="\"$(GIT_VER)\"" -DPKG_VER="\"$(PKG_VER)\"" | |
| 3 | 5 | |
| 4 | 6 | %.h: %.bin ./bin2c |
| 5 | 7 | ./bin2c $< $@ | ... | ... |
main.c