aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJan Sucan <jan@jansucan.com>2021-05-01 10:57:28 +0200
committerJan Sucan <jan@jansucan.com>2021-05-01 10:57:28 +0200
commit36a92af6ee3c20c93835a34ddeb148c34ccf023c (patch)
tree791fa756d58b132dd8df50a808bfaa168989ddcc /Makefile
parent7e9034e80ea8ce4dc8a4635a42894e7294ecc85e (diff)
Makefile: Avoid unnecessary rebuilding of the executable
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c3ccaeb..04b5c90 100644
--- a/Makefile
+++ b/Makefile
@@ -9,10 +9,12 @@ CFLAGS=-Wall
SOURCES=*.c
HEADERS=*.h
-all: $(SOURCES) $(HEADERS) program_info_header
+all: $(PROGRAM_NAME)
+
+$(PROGRAM_NAME): $(SOURCES) $(HEADERS) program_info.h
$(CC) $(CFLAGS) -o $(PROGRAM_NAME) $(SOURCES)
-program_info_header:
+program_info.h:
echo "#define PROGRAM_NAME_STR \"$(PROGRAM_NAME)\"" >program_info.h
echo "#define PROGRAM_VERSION_STR \"$(PROGRAM_VERSION)\"" >>program_info.h