Skip to content

Commit

Permalink
Allow changing POAC_ variables in Makefile (#918)
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui authored Mar 13, 2024
1 parent ec82382 commit cd65306
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ CXX ?= clang++
POAC_TIDY ?= clang-tidy
PREFIX ?= /usr/local
INSTALL ?= install
COMMIT_HASH ?= $(shell git rev-parse HEAD)
COMMIT_SHORT_HASH ?= $(shell git rev-parse --short HEAD)
COMMIT_DATE ?= $(shell git show -s --date=format-local:'%Y-%m-%d' --format=%cd)

DEBUG_FLAGS := -g -O0 -DDEBUG
RELEASE_FLAGS := -O3 -DNDEBUG -flto
Expand All @@ -18,9 +21,9 @@ VERSION := $(shell grep -m1 version poac.toml | cut -f 2 -d'"')
MKDIR_P := @mkdir -p

DEFINES := -DPOAC_PKG_VERSION='"$(VERSION)"' \
-DPOAC_COMMIT_HASH='"$(shell git rev-parse HEAD)"' \
-DPOAC_COMMIT_SHORT_HASH='"$(shell git rev-parse --short HEAD)"' \
-DPOAC_COMMIT_DATE='"$(shell git show -s --date=format-local:'%Y-%m-%d' --format=%cd)"'
-DPOAC_COMMIT_HASH='"$(COMMIT_HASH)"' \
-DPOAC_COMMIT_SHORT_HASH='"$(COMMIT_SHORT_HASH)"' \
-DPOAC_COMMIT_DATE='"$(COMMIT_DATE)"'
INCLUDES := -isystem $(O)/DEPS/toml11 \
$(shell pkg-config --cflags 'libgit2 >= 1.1.0, libgit2 < 2.0.0') \
$(shell pkg-config --cflags 'libcurl >= 7.79.1, libcurl < 9.0.0') \
Expand Down

0 comments on commit cd65306

Please sign in to comment.