From d1eeddbc07e5d5fea402790f942edb0f1ae09374 Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sun, 7 Apr 2024 14:54:32 +0200 Subject: Use const global variables instead of #define --- src/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 2f6ec09..a16283e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,8 +9,9 @@ $(PROGRAM_NAME): $(SOURCES) $(HEADERS) program_info.h $(CC) $(CFLAGS) -o $(PROGRAM_NAME) $(SOURCES) program_info.h: - echo "#define PROGRAM_NAME_STR \"$(PROGRAM_NAME)\"" >program_info.h - echo "#define PROGRAM_VERSION_STR \"$(PROGRAM_VERSION)\"" >>program_info.h + echo '#include ' + echo "const std::string PROGRAM_NAME_STR {\"$(PROGRAM_NAME)\"};" >program_info.h + echo "const std::string PROGRAM_VERSION_STR {\"$(PROGRAM_VERSION)\"};" >>program_info.h .PHONY: clean -- cgit v1.2.3