aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2024-04-07 14:54:32 +0200
committerJán Sučan <jan@jansucan.com>2024-04-07 15:01:38 +0200
commitd1eeddbc07e5d5fea402790f942edb0f1ae09374 (patch)
tree00cc895a1468297f81be56a265ca76d0766d11b0
parent4d7dd62fcf8d0f1feb96dc0749aa3003750ff7eb (diff)
Use const global variables instead of #define
-rw-r--r--src/Makefile5
1 files changed, 3 insertions, 2 deletions
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 <string>'
+ 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