68 lines
2.3 KiB
Diff
68 lines
2.3 KiB
Diff
diff -uNr mupdf-1.18.0-source/Makefile mupdf-1.18.0-source.mod/Makefile
|
|
--- mupdf-1.18.0-source/Makefile 2020-10-07 13:35:03.000000000 +0300
|
|
+++ mupdf-1.18.0-source.mod/Makefile 2021-08-05 19:47:26.364131551 +0300
|
|
@@ -48,6 +48,7 @@
|
|
QUIET_CXX = @ echo " CXX $@" ;
|
|
QUIET_GEN = @ echo " GEN $@" ;
|
|
QUIET_LINK = @ echo " LINK $@" ;
|
|
+ QUIET_LINK_FOR_BUILD = @ echo " LINK_FOR_BUILD $@" ;
|
|
QUIET_RM = @ echo " RM $@" ;
|
|
QUIET_TAGS = @ echo " TAGS $@" ;
|
|
QUIET_WINDRES = @ echo " WINDRES $@" ;
|
|
@@ -62,10 +63,19 @@
|
|
RANLIB_CMD = $(QUIET_RANLIB) $(RANLIB) $@
|
|
endif
|
|
LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
+LINK_FOR_BUILD_CMD = $(QUIET_LINK_FOR_BUILD) $(MKTGTDIR) ; $(CC_FOR_BUILD) -o $@ $^
|
|
TAGS_CMD = $(QUIET_TAGS) ctags -R --c-kinds=+p
|
|
WINDRES_CMD = $(QUIET_WINDRES) $(MKTGTDIR) ; $(WINDRES) $< $@
|
|
OBJCOPY_CMD = $(QUIET_OBJCOPY) $(MKTGTDIR) ; $(LD) -r -b binary -z noexecstack -o $@ $<
|
|
|
|
+ifeq ($(shared),yes)
|
|
+LINK_CMD = $(QUIET_LINK) $(MKTGTDIR) ; $(CC) $(LDFLAGS) -o $@ \
|
|
+ $(filter-out %.$(SO),$^) \
|
|
+ $(sort $(patsubst %,-L%,$(dir $(filter %.$(SO),$^)))) \
|
|
+ $(patsubst lib%.$(SO),-l%,$(notdir $(filter %.$(SO),$^))) \
|
|
+ $(LIBS)
|
|
+endif
|
|
+
|
|
# --- Rules ---
|
|
|
|
$(OUT)/%.a :
|
|
@@ -73,7 +81,7 @@
|
|
$(RANLIB_CMD)
|
|
|
|
$(OUT)/%.exe: %.c
|
|
- $(LINK_CMD)
|
|
+ $(LINK_FOR_BUILD_CMD)
|
|
|
|
$(OUT)/%.$(SO):
|
|
$(LINK_CMD) $(LIB_LDFLAGS) $(THIRD_LIBS) $(LIBCRYPTO_LIBS)
|
|
@@ -321,7 +329,7 @@
|
|
$(OUT)/example: docs/examples/example.c $(MUPDF_LIB) $(THIRD_LIB)
|
|
$(LINK_CMD) $(CFLAGS) $(THIRD_LIBS)
|
|
$(OUT)/multi-threaded: docs/examples/multi-threaded.c $(MUPDF_LIB) $(THIRD_LIB)
|
|
- $(LINK_CMD) $(CFLAGS) $(THIRD_LIBS) -lpthread
|
|
+ $(LINK_CMD) $(CFLAGS) $(THIRD_LIBS)
|
|
|
|
# --- Update version string header ---
|
|
|
|
@@ -355,7 +363,7 @@
|
|
tools: $(TOOL_APPS)
|
|
apps: $(TOOL_APPS) $(VIEW_APPS)
|
|
|
|
-install: libs apps
|
|
+install: libs tools
|
|
install -d $(DESTDIR)$(incdir)/mupdf
|
|
install -d $(DESTDIR)$(incdir)/mupdf/fitz
|
|
install -d $(DESTDIR)$(incdir)/mupdf/pdf
|
|
@@ -367,7 +375,7 @@
|
|
install -m 644 $(INSTALL_LIBS) $(DESTDIR)$(libdir)
|
|
|
|
install -d $(DESTDIR)$(bindir)
|
|
- install -m 755 $(TOOL_APPS) $(VIEW_APPS) $(DESTDIR)$(bindir)
|
|
+ install -m 755 $(TOOL_APPS) $(DESTDIR)$(bindir)
|
|
|
|
install -d $(DESTDIR)$(mandir)/man1
|
|
install -m 644 docs/man/*.1 $(DESTDIR)$(mandir)/man1
|