From ad9955a9cf2200bf00e607da39a226c4c1d45a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Wed, 6 Sep 2017 20:12:09 +0200 Subject: Move configuration parts from Makefile into config.mk --- Makefile | 30 ++++-------------------------- config.mk | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 config.mk diff --git a/Makefile b/Makefile index 8b3f4b5..bdc770b 100644 --- a/Makefile +++ b/Makefile @@ -1,31 +1,9 @@ -VERSION := git-20170517 - -PREFIX := /usr/local -MANPREFIX := $(PREFIX)/share/man - -CC ?= gcc -CFLAGS += -std=c99 -Wall -pedantic -CPPFLAGS += -I/usr/include/freetype2 -D_XOPEN_SOURCE=700 -LDFLAGS += -LIBS := -lImlib2 -lX11 -lXft - -# optional dependencies: -# giflib: gif animations -ifndef NO_GIFLIB - CPPFLAGS += -DHAVE_GIFLIB - LIBS += -lgif -endif -# libexif: jpeg auto-orientation, exif thumbnails -ifndef NO_LIBEXIF - CPPFLAGS += -DHAVE_LIBEXIF - LIBS += -lexif -endif - -# select autoreload backend -# overwritten with `make AUTORELOAD=nop` -AUTORELOAD := inotify +VERSION := git-20170906 .PHONY: clean install uninstall +.SUFFIXES: + +include config.mk SRC := autoreload_$(AUTORELOAD).c commands.c image.c main.c options.c thumbs.c util.c window.c DEP := $(SRC:.c=.d) diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..a20e6e3 --- /dev/null +++ b/config.mk @@ -0,0 +1,24 @@ +PREFIX := /usr/local +MANPREFIX := $(PREFIX)/share/man + +CC ?= gcc +CFLAGS += -std=c99 -Wall -pedantic +CPPFLAGS += -I/usr/include/freetype2 -D_XOPEN_SOURCE=700 +LDFLAGS += +LIBS := -lImlib2 -lX11 -lXft + +# autoreload backend: inotify/nop +AUTORELOAD := inotify + +# optional dependencies: +# giflib: gif animations +ifndef NO_GIFLIB + CPPFLAGS += -DHAVE_GIFLIB + LIBS += -lgif +endif +# libexif: jpeg auto-orientation, exif thumbnails +ifndef NO_LIBEXIF + CPPFLAGS += -DHAVE_LIBEXIF + LIBS += -lexif +endif + -- cgit v1.2.3