summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 17:35:41 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 17:35:41 -0300
commite75e4a5829fb252c15d0bc75f5703975080655f6 (patch)
treece402b6eb193cce65be737ad2b630de083c2361b /Makefile
parentf9a7a7eac4c7f9d645dbf80ee42ab663c58932af (diff)
downloadeeshow-e75e4a5829fb252c15d0bc75f5703975080655f6.tar.gz
eeshow-e75e4a5829fb252c15d0bc75f5703975080655f6.tar.bz2
eeshow-e75e4a5829fb252c15d0bc75f5703975080655f6.zip
eeshow/: make WebKit optional; add Gtk-based fallback viewer
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 13 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 1153578..ece7f79 100644
--- a/Makefile
+++ b/Makefile
@@ -27,13 +27,19 @@ CFLAGS = -g -Wall -Wextra -Wno-unused-parameter -Wshadow \
-I. \
`pkg-config --cflags cairo` \
`pkg-config --cflags libgit2` \
- `pkg-config --cflags gtk+-3.0` \
- `pkg-config --cflags webkit2gtk-4.0`
+ `pkg-config --cflags gtk+-3.0`
LDLIBS = -lm \
`pkg-config --libs cairo` \
`pkg-config --libs libgit2` \
- `pkg-config --libs gtk+-3.0` \
- `pkg-config --libs webkit2gtk-4.0`
+ `pkg-config --libs gtk+-3.0`
+
+ifneq ($(USE_WEBKIT),)
+ CFLAGS += -DUSE_WEBKIT `pkg-config --cflags webkit2gtk-4.0`
+ LDLIBS += `pkg-config --libs webkit2gtk-4.0`
+ HELP_TEXT = help.html
+else
+ HELP_TEXT = help.txt
+endif
include ../common/Makefile.c-common
@@ -44,8 +50,9 @@ all:: $(NAME)
$(NAME): $(OBJS)
$(CC) -o $(NAME) $(OBJS) $(LDLIBS)
-help.inc: help.html
- $(BUILD) sed 's/.*/"&"/' $< >$@ || { rm -f $@; exit 1; }
+help.inc: $(HELP_TEXT) Makefile
+ $(BUILD) sed 's/"/\\"/g;s/.*/"&\\n"/' $< >$@ || \
+ { rm -f $@; exit 1; }
gui/help.c: help.inc