summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-03-07 15:40:09 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-03-15 09:47:01 +0100
commit3966550ae8198eef2050c24d87dd7a89d1410ded (patch)
tree8fe50f9a6bf4666cf8cf4a16447956e357ecf01e /Makefile
parent0f5f5642a01dc7e8b9bc421ea8712c31e4c43429 (diff)
downloadmupdf-3966550ae8198eef2050c24d87dd7a89d1410ded.tar.xz
Only include pthread library when needed.
Rename HAVE_PTHREADS to HAVE_PTHREAD to match naming of other defines, where the macro is named after the library that is linked.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8b423144..787f34d9 100644
--- a/Makefile
+++ b/Makefile
@@ -191,6 +191,9 @@ $(OUT)/%.o : source/%.c | $(ALL_DIR)
$(OUT)/%.o : source/%.cpp | $(ALL_DIR)
$(CXX_CMD)
+$(OUT)/helpers/%.o : source/helpers/%.c | $(ALL_DIR)
+ $(CC_CMD) $(PTHREAD_CFLAGS) -DHAVE_PTHREAD
+
$(OUT)/%.o : scripts/%.c | $(OUT)
$(CC_CMD)
@@ -275,13 +278,13 @@ $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
MUTOOL_LIB = $(OUT)/libmutools.a
$(MUTOOL_LIB) : $(MUTOOL_OBJ)
$(MUTOOL) : $(MUTOOL_LIB) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
- $(LINK_CMD)
+ $(LINK_CMD) $(PTHREAD_LIBS)
MURASTER := $(OUT)/muraster
MURASTER_OBJ := $(addprefix $(OUT)/tools/, muraster.o)
$(MURASTER_OBJ): $(FITZ_HDR)
$(MURASTER) : $(MURASTER_OBJ) $(MUPDF_LIB) $(THIRD_LIB) $(THREAD_LIB)
- $(LINK_CMD)
+ $(LINK_CMD) $(PTHREAD_LIBS)
MJSGEN := $(OUT)/mjsgen
MJSGEN_OBJ := $(addprefix $(OUT)/tools/, mjsgen.o)