diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | make/gcc-linux.mk | 5 | ||||
-rw-r--r-- | make/installwin.mk | 17 | ||||
-rw-r--r-- | make/libtool.mk | 27 | ||||
-rw-r--r-- | make/mingw.mk | 8 | ||||
-rw-r--r-- | make/msvc.mk | 6 |
6 files changed, 66 insertions, 1 deletions
@@ -120,7 +120,9 @@ all: $(ALL_TARGETS) ; check: $(TEST_TARGETS) -install_docs:: +# Install targets are in the make directory in the rules-specific make +# fragments. + install: all ./mkinstalldirs $(DESTDIR)$(libdir) ./mkinstalldirs $(DESTDIR)$(bindir) diff --git a/make/gcc-linux.mk b/make/gcc-linux.mk index 6450ce75..50b7dd0f 100644 --- a/make/gcc-linux.mk +++ b/make/gcc-linux.mk @@ -80,3 +80,8 @@ endef define makebin $(CXX) $(CXXFLAGS) $(1) -o $(2) $(LDFLAGS) $(3) $(4) endef + +# Install target + +install: all + @echo Automated installation is not supported for buildrules=$(BUILDRULES) diff --git a/make/installwin.mk b/make/installwin.mk new file mode 100644 index 00000000..f1b79ff6 --- /dev/null +++ b/make/installwin.mk @@ -0,0 +1,17 @@ +installwin: all + $(RM) -r $(INSTALL_DIR) + mkdir $(INSTALL_DIR)/bin + mkdir $(INSTALL_DIR)/lib + mkdir $(INSTALL_DIR)/include + mkdir $(INSTALL_DIR)/include/qpdf + mkdir $(INSTALL_DIR)/doc + cp libqpdf/$(OUTPUT_DIR)/qpdf.lib $(INSTALL_DIR)/lib + cp libqpdf/$(OUTPUT_DIR)/qpdf*.dll $(INSTALL_DIR)/bin + cp qpdf/$(OUTPUT_DIR)/bin/qpdf.exe $(INSTALL_DIR)/bin + cp zlib-flate/$(OUTPUT_DIR)/bin/zlib-flate.exe $(INSTALL_DIR)/bin + cp qpdf/fix-qdf $(INSTALL_DIR)/bin + cp include/qpdf/*.h $(INSTALL_DIR)/include/qpdf + cp include/qpdf/*.hh $(INSTALL_DIR)/include/qpdf + cp doc/stylesheet.css $(INSTALL_DIR)/doc + cp doc/qpdf-manual.html $(INSTALL_DIR)/doc + cp doc/qpdf-manual.pdf $(DESTDIR)$(docdir) diff --git a/make/libtool.mk b/make/libtool.mk index 3211b604..948442da 100644 --- a/make/libtool.mk +++ b/make/libtool.mk @@ -89,3 +89,30 @@ endef define makebin $(LIBTOOL) --mode=link $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4) endef + +# Install target + +install: all + ./mkinstalldirs $(DESTDIR)$(libdir) + ./mkinstalldirs $(DESTDIR)$(bindir) + ./mkinstalldirs $(DESTDIR)$(includedir)/qpdf + ./mkinstalldirs $(DESTDIR)$(docdir) + ./mkinstalldirs $(DESTDIR)$(mandir)/man1 + $(LIBTOOL) --mode=install install -s -c \ + libqpdf/$(OUTPUT_DIR)/libqpdf.la \ + $(DESTDIR)$(libdir)/libqpdf.la + $(LIBTOOL) --finish $(DESTDIR)$(libdir) + $(RM) $(DESTDIR)$(libdir)/libqpdf.la + $(LIBTOOL) --mode=install install -s -c \ + qpdf/$(OUTPUT_DIR)/qpdf \ + $(DESTDIR)$(bindir)/qpdf + $(LIBTOOL) --mode=install install -s -c \ + zlib-flate/$(OUTPUT_DIR)/zlib-flate \ + $(DESTDIR)$(bindir)/zlib-flate + cp qpdf/fix-qdf $(DESTDIR)$(bindir) + cp include/qpdf/*.h $(DESTDIR)$(includedir)/qpdf + cp include/qpdf/*.hh $(DESTDIR)$(includedir)/qpdf + cp doc/stylesheet.css $(DESTDIR)$(docdir) + cp doc/qpdf-manual.html $(DESTDIR)$(docdir) + cp doc/qpdf-manual.pdf $(DESTDIR)$(docdir) + cp doc/*.1 $(DESTDIR)$(mandir)/man1 diff --git a/make/mingw.mk b/make/mingw.mk index 14bfdff8..2ef2691f 100644 --- a/make/mingw.mk +++ b/make/mingw.mk @@ -72,3 +72,11 @@ endef define makebin $(CXX) $(CXXFLAGS) $(1) -o $(2) $(3) $(4) endef + +# Install target + +INSTALL_DIR = install-mingw +include make/installwin.mk +install: installwin + strip $(INSTALL_DIR)/bin/*.exe + strip $(INSTALL_DIR)/bin/*.dll diff --git a/make/msvc.mk b/make/msvc.mk index eb6c6ac7..1edffb9a 100644 --- a/make/msvc.mk +++ b/make/msvc.mk @@ -88,3 +88,9 @@ define makebin -outputresource:$(2)\;2; \ fi endef + +# Install target + +INSTALL_DIR = install-msvc +include make/installwin.mk +install: installwin |