summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-04-08 12:24:14 +0200
committerRobin Watts <robin.watts@artifex.com>2015-04-08 11:29:56 +0100
commit294b5b63c568cfb2f4a56fb51e27e218c6ce89b8 (patch)
tree204cdaf2f2fd3b2c6b44939f9485f7036038acae /Makefile
parent7c3520a0849a51ec6e1c754c5a295dc981eea339 (diff)
downloadmupdf-294b5b63c568cfb2f4a56fb51e27e218c6ce89b8.tar.xz
Add docs/example.c and docs/multi-threaded.c to 'make examples' target.
Also update the examples for the recent API changes and make them build under MSVC.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1b328d6d..7efd082e 100644
--- a/Makefile
+++ b/Makefile
@@ -289,9 +289,17 @@ endif
MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32)
MUVIEW_CURL := $(MUVIEW_X11_CURL) $(MUVIEW_WIN32_CURL)
-
INSTALL_APPS := $(MUDRAW) $(MUTOOL) $(MUVIEW) $(MUJSTEST) $(MUVIEW_CURL)
+# --- Examples ---
+
+examples: $(OUT)/example $(OUT)/multi-threaded
+
+$(OUT)/example: docs/example.c $(MUPDF_LIB) $(THIRD_LIBS)
+ $(LINK_CMD) $(CFLAGS)
+$(OUT)/multi-threaded: docs/multi-threaded.c $(MUPDF_LIB) $(THIRD_LIBS)
+ $(LINK_CMD) $(CFLAGS) -lpthread
+
# --- Update version string header ---
VERSION = $(shell git describe --tags)