Commit 515d33b92722a28b77c1bc54f26f06b24a1cb467
Committed by
GitHub
Merge pull request #109 from timg236/rpiboot-version-info
rpiboot: Add build date and version
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