Allow setting GIT_VERSION

This commit is contained in:
orbea 2017-01-19 16:35:21 -08:00
parent 61b10c57e2
commit 2bafab042e
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ endif
TARGET_NAME := genesis_plus_gx TARGET_NAME := genesis_plus_gx
LIBM := -lm LIBM := -lm
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" GIT_VERSION ?= " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown") ifneq ($(GIT_VERSION)," unknown")
CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif endif

View File

@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS) include $(CLEAR_VARS)
GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" GIT_VERSION ?= " $(shell git rev-parse --short HEAD || echo unknown)"
ifneq ($(GIT_VERSION)," unknown") ifneq ($(GIT_VERSION)," unknown")
LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" LOCAL_CFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\"
endif endif