From e928ce51bd8c26742abfd537b054483a18a9689c Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 30 Jun 2023 02:37:27 +0200 Subject: show git hash with --version Also, use cmake's configure_file to build string constants in. --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 91806f0..769db70 100644 --- a/Makefile +++ b/Makefile @@ -28,11 +28,13 @@ install_dir := $(build_dir)/install COMPILER ?= clang CONFIGURATION ?= Debug DEFAULT_HOST ?= 127.0.0.1 +DEFAULT_PORT ?= 5556 INSTALL_PREFIX ?= $(install_dir) $(eval $(call noexpand,COMPILER)) $(eval $(call noexpand,CONFIGURATION)) $(eval $(call noexpand,DEFAULT_HOST)) +$(eval $(call noexpand,DEFAULT_PORT)) $(eval $(call noexpand,INSTALL_PREFIX)) .PHONY: all @@ -51,6 +53,7 @@ build: -D 'CMAKE_BUILD_TYPE=$(call escape,$(CONFIGURATION))' \ -D 'CMAKE_INSTALL_PREFIX=$(call escape,$(INSTALL_PREFIX))' \ -D 'DEFAULT_HOST=$(call escape,$(DEFAULT_HOST))' \ + -D 'DEFAULT_PORT=$(call escape,$(DEFAULT_PORT))' \ -S '$(call escape,$(src_dir))' \ -B '$(call escape,$(cmake_dir))' cmake --build '$(call escape,$(cmake_dir))' -- -j -- cgit v1.2.3