From 0964d47d079785b49b2ed5d0e0d677a9a72687e5 Mon Sep 17 00:00:00 2001 From: zsugabubus Date: Tue, 16 Jun 2020 10:12:52 +0200 Subject: [PATCH] sowm: fix Makefile dependencies So the binary no longer need to be deleted for a recompilation. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3450a85..20f3734 100644 --- a/Makefile +++ b/Makefile @@ -4,13 +4,13 @@ PREFIX ?= /usr BINDIR ?= $(PREFIX)/bin CC ?= gcc -all: config.h sowm +all: sowm config.h: cp config.def.h config.h -sowm: - $(CC) -O3 $(CFLAGS) -o sowm sowm.c -lX11 $(LDFLAGS) +sowm: sowm.c sowm.h config.h Makefile + $(CC) -O3 $(CFLAGS) -o $@ $< -lX11 $(LDFLAGS) install: all install -Dm755 sowm $(DESTDIR)$(BINDIR)/sowm @@ -20,3 +20,5 @@ uninstall: clean: rm -f sowm *.o + +.PHONY: all install uninstall clean