Updated Makefile for openmp-c to add build date and commit author
to embedded version info in the binary.
This commit is contained in:
parent
2542c6b1c3
commit
e213617d4e
1 changed files with 5 additions and 1 deletions
|
|
@ -4,14 +4,18 @@
|
||||||
COMPILER_VER:=$(shell gcc --version)
|
COMPILER_VER:=$(shell gcc --version)
|
||||||
COMPILER_OPTS=-fopenmp
|
COMPILER_OPTS=-fopenmp
|
||||||
GIT_DESCRIBE:=$(shell git describe --abbrev=7 --dirty --always --tags --long)
|
GIT_DESCRIBE:=$(shell git describe --abbrev=7 --dirty --always --tags --long)
|
||||||
|
GIT_AUTHOR:=$(shell git --no-pager log -1 --pretty=format:"%an <%ae>")
|
||||||
|
BUILD_DATE:=$(shell date +"%F %H:%M:%S")
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: hello-omp
|
all: hello-omp
|
||||||
|
|
||||||
versioninfo.txt:
|
versioninfo.txt:
|
||||||
@echo "@(#) Compiler version: ${COMPILER_VER}." >versioninfo.txt
|
@echo "@(#) Build date: ${BUILD_DATE}." >versioninfo.txt
|
||||||
|
@echo "@(#) Compiler version: ${COMPILER_VER}." >>versioninfo.txt
|
||||||
@echo "@(#) Compiler options: ${COMPILER_OPTS}." >>versioninfo.txt
|
@echo "@(#) Compiler options: ${COMPILER_OPTS}." >>versioninfo.txt
|
||||||
@echo "@(#) Git info: ${GIT_DESCRIBE}" >>versioninfo.txt
|
@echo "@(#) Git info: ${GIT_DESCRIBE}" >>versioninfo.txt
|
||||||
|
@echo "@(#) Commit author: ${GIT_AUTHOR}" >>versioninfo.txt
|
||||||
|
|
||||||
versioninfo.o: versioninfo.txt
|
versioninfo.o: versioninfo.txt
|
||||||
objcopy --input binary \
|
objcopy --input binary \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue