From edb117e3bdb4d6bef4a4749d94144df8472c0a4d Mon Sep 17 00:00:00 2001 From: Max Voit Date: Thu, 26 Jan 2017 22:18:32 +0100 Subject: Add autoreload support by inotify (and dummy backend nop) --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f375fa3..4276326 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,13 @@ endif .PHONY: clean install uninstall SRC := commands.c image.c main.c options.c thumbs.c util.c window.c +# conditionally compile in autoreload-backend; usage: `make AUTORELOAD=nop` +ifeq ($(AUTORELOAD),nop) + SRC += autoreload_nop.c +else + SRC += autoreload_inotify.c +endif + DEP := $(SRC:.c=.d) OBJ := $(SRC:.c=.o) -- cgit v1.2.3 From 8aaa5c9398b6cbb0a85ed77812c3f6d11fe80f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Wed, 17 May 2017 20:11:44 +0200 Subject: Simplify autoreload backend selection in Makefile --- Makefile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4276326..8b3f4b5 100644 --- a/Makefile +++ b/Makefile @@ -21,16 +21,13 @@ ifndef NO_LIBEXIF LIBS += -lexif endif -.PHONY: clean install uninstall +# select autoreload backend +# overwritten with `make AUTORELOAD=nop` +AUTORELOAD := inotify -SRC := commands.c image.c main.c options.c thumbs.c util.c window.c -# conditionally compile in autoreload-backend; usage: `make AUTORELOAD=nop` -ifeq ($(AUTORELOAD),nop) - SRC += autoreload_nop.c -else - SRC += autoreload_inotify.c -endif +.PHONY: clean install uninstall +SRC := autoreload_$(AUTORELOAD).c commands.c image.c main.c options.c thumbs.c util.c window.c DEP := $(SRC:.c=.d) OBJ := $(SRC:.c=.o) -- cgit v1.2.3