diff options
| author | Jan Sucan <jan@jansucan.com> | 2024-04-07 14:54:32 +0200 |
|---|---|---|
| committer | Ján Sučan <jan@jansucan.com> | 2024-04-07 15:01:38 +0200 |
| commit | d1eeddbc07e5d5fea402790f942edb0f1ae09374 (patch) | |
| tree | 00cc895a1468297f81be56a265ca76d0766d11b0 /src | |
| parent | 4d7dd62fcf8d0f1feb96dc0749aa3003750ff7eb (diff) | |
Use const global variables instead of #define
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 5 |
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 |
