summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Münnich <ber.t@posteo.de>2017-05-17 20:11:44 +0200
committerBert Münnich <ber.t@posteo.de>2017-05-17 20:11:44 +0200
commit8aaa5c9398b6cbb0a85ed77812c3f6d11fe80f8e (patch)
treecc0ca212169afa010003e1f4c5a05c5c275d36a9
parent3724d3fc17dc6135a05608cab5bdf00c6978282d (diff)
downloadnsxiv-8aaa5c9398b6cbb0a85ed77812c3f6d11fe80f8e.tar.zst
Simplify autoreload backend selection in Makefile
-rw-r--r--Makefile13
1 files changed, 5 insertions, 8 deletions
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)