systemlib: Use build directory for git version

This commit is contained in:
Lorenz Meier
2015-05-23 10:18:20 +02:00
parent 6d7e063148
commit 0d134aac53
3 changed files with 3 additions and 4 deletions

View File

@@ -49,8 +49,8 @@ ifneq ($(words $(GIT_DESC)),1)
GIT_DESC := "unknown_git_version"
endif
$(shell echo "#include \"git_version.h\"" > src/modules/systemlib/git_version.c)
$(shell echo "const char* px4_git_version = \"$(GIT_DESC)\";" >> src/modules/systemlib/git_version.c)
$(shell echo "#include <systemlib/git_version.h>" > $(BUILD_DIR)git_version.c)
$(shell echo "const char* px4_git_version = \"$(GIT_DESC)\";" >> $(BUILD_DIR)git_version.c)
#
# Canned firmware configurations that we (know how to) build.

View File

@@ -1 +0,0 @@
git_version.c

View File

@@ -56,7 +56,7 @@ SRCS = err.c \
circuit_breaker.cpp \
circuit_breaker_params.c \
mcu_version.c \
git_version.c
$(BUILD_DIR)git_version.c
MAXOPTIMIZATION = -Os