From 36a92af6ee3c20c93835a34ddeb148c34ccf023c Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Sat, 1 May 2021 10:57:28 +0200 Subject: Makefile: Avoid unnecessary rebuilding of the executable --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile') 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 -- cgit v1.2.3