mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-06 00:03:42 +08:00
5eb75de249
git-subtree-dir: panda git-subtree-split: c371fe688dbad4c53635905d3471a01c185e811d old-commit-hash: c251b312d87d26b5ed347b267f6f1570793f9b91
19 lines
701 B
Makefile
19 lines
701 B
Makefile
ifeq ($(RELEASE),1)
|
|
BUILD_TYPE = "RELEASE"
|
|
else
|
|
BUILD_TYPE = "DEBUG"
|
|
endif
|
|
|
|
ifneq ($(wildcard ../.git/HEAD),)
|
|
obj/gitversion.h: ../VERSION ../.git/HEAD ../.git/index
|
|
echo "const uint8_t gitversion[] = \"$(shell cat ../VERSION)-$(shell git rev-parse --short=8 HEAD)-$(BUILD_TYPE)\";" > $@
|
|
else
|
|
ifneq ($(wildcard ../../.git/modules/panda/HEAD),)
|
|
obj/gitversion.h: ../VERSION ../../.git/modules/panda/HEAD ../../.git/modules/panda/index
|
|
echo "const uint8_t gitversion[] = \"$(shell cat ../VERSION)-$(shell git rev-parse --short=8 HEAD)-$(BUILD_TYPE)\";" > $@
|
|
else
|
|
obj/gitversion.h: ../VERSION
|
|
echo "const uint8_t gitversion[] = \"$(shell cat ../VERSION)-unknown-$(BUILD_TYPE)\";" > $@
|
|
endif
|
|
endif
|