|
| 1 | +## Makefile to install nuget package dependencies. |
| 2 | +################################################################## |
| 3 | + |
| 4 | +INST=GEN.DEPS |
| 5 | +INST_INC=$(INST)/include |
| 6 | +INST_LIB=$(INST)/lib |
| 7 | +INST_BIN=$(INST)/bin |
| 8 | + |
| 9 | +PKGDIR=GEN.PKGS |
| 10 | + |
| 11 | +################################################################## |
| 12 | +all: unpack expat libssh libssh_redist curl curl_redist openssl zlib |
| 13 | + |
| 14 | +unpack: |
| 15 | + [ -d $(PKGDIR) ] || mkdir $(PKGDIR) |
| 16 | + nuget.exe restore packages.config -ConfigFile nuget.config \ |
| 17 | + -NonInteractive -OutputDirectory $(PKGDIR) |
| 18 | + |
| 19 | +insdir: |
| 20 | + [ -d $(INST) ] || mkdir $(INST) |
| 21 | + [ -d $(INST_INC) ] || mkdir $(INST_INC) |
| 22 | + [ -d $(INST_BIN) ] || mkdir $(INST_BIN) |
| 23 | + [ -d $(INST_LIB) ] || mkdir $(INST_LIB) |
| 24 | + |
| 25 | +################################################################## |
| 26 | +## We place the expat headers in their own subdirectory. |
| 27 | +## The custom is to reference <expat.h>, so compile with: |
| 28 | +## -I$(INST_INC)/expat |
| 29 | + |
| 30 | +EXPAT_VER=2.1.0.11 |
| 31 | +EXPAT_ROOT=$(PKGDIR)/expat.$(EXPAT_VER)/build/native |
| 32 | +EXPAT_INC=$(EXPAT_ROOT)/include |
| 33 | +EXPAT_LIB=$(EXPAT_ROOT)/lib/v110/x64/Release/dynamic/utf8 |
| 34 | + |
| 35 | +expat: insdir |
| 36 | + [ -d $(INST_INC)/expat ] || mkdir $(INST_INC)/expat |
| 37 | + cp -r $(EXPAT_INC)/* $(INST_INC)/expat/ |
| 38 | + cp -r $(EXPAT_LIB)/* $(INST_LIB)/ |
| 39 | + |
| 40 | + |
| 41 | +################################################################## |
| 42 | + |
| 43 | +LIBSSH_VER=1.4.3.3 |
| 44 | +LIBSSH_ROOT=$(PKGDIR)/libssh2.$(LIBSSH_VER)/build/native |
| 45 | +LIBSSH_INC=$(LIBSSH_ROOT)/include |
| 46 | +LIBSSH_LIB=$(LIBSSH_ROOT)/lib/v110/x64/Release/dynamic/cdecl |
| 47 | + |
| 48 | +libssh: insdir |
| 49 | + [ -d $(INST_INC)/libssh2 ] || mkdir $(INST_INC)/libssh2 |
| 50 | + cp -r $(LIBSSH_INC)/* $(INST_INC)/libssh2 |
| 51 | + cp -r $(LIBSSH_LIB)/* $(INST_LIB)/ |
| 52 | + |
| 53 | + |
| 54 | +LIBSSH_REDIST_ROOT=$(PKGDIR)/libssh2.redist.$(LIBSSH_VER)/build/native |
| 55 | +LIBSSH_REDIST_BIN=$(LIBSSH_REDIST_ROOT)/bin/v110/x64/Release/dynamic/cdecl |
| 56 | + |
| 57 | +libssh_redist: insdir |
| 58 | + cp -r $(LIBSSH_REDIST_BIN)/* $(INST_BIN)/ |
| 59 | + |
| 60 | + |
| 61 | +################################################################## |
| 62 | +## We place the curl headers in their own subdirectory. |
| 63 | +## The custom is to reference <curl/curl.h>, so compile with: |
| 64 | +## -I$(INST_INC) |
| 65 | + |
| 66 | +CURL_VER=7.30.0.2 |
| 67 | +CURL_ROOT=$(PKGDIR)/curl.$(CURL_VER)/build/native |
| 68 | +CURL_INC=$(CURL_ROOT)/include/curl |
| 69 | +CURL_LIB=$(CURL_ROOT)/lib/v110/x64/Release/dynamic |
| 70 | + |
| 71 | +curl: insdir |
| 72 | + [ -d $(INST_INC)/curl ] || mkdir $(INST_INC)/curl |
| 73 | + cp -r $(CURL_INC)/* $(INST_INC)/curl |
| 74 | + cp -r $(CURL_LIB)/* $(INST_LIB)/ |
| 75 | + |
| 76 | + |
| 77 | +CURL_REDIST_ROOT=$(PKGDIR)/curl.redist.$(CURL_VER)/build/native |
| 78 | +CURL_REDIST_BIN=$(CURL_REDIST_ROOT)/bin/v110/x64/Release/dynamic |
| 79 | + |
| 80 | +curl_redist: insdir |
| 81 | + cp -r $(CURL_REDIST_BIN)/* $(INST_BIN)/ |
| 82 | + |
| 83 | + |
| 84 | +################################################################## |
| 85 | +## We place the openssl headers in their own subdirectory. |
| 86 | +## The custom is to reference <openssl/sha.h>, so compile with: |
| 87 | +## -I$(INST_INC) |
| 88 | + |
| 89 | +OPENSSL_VER=1.0.2.1 |
| 90 | +OPENSSL_ROOT=$(PKGDIR)/openssl.v140.windesktop.msvcstl.dyn.rt-dyn.x64.$(OPENSSL_VER) |
| 91 | +OPENSSL_INC=$(OPENSSL_ROOT)/build/native/include/openssl |
| 92 | +OPENSSL_LIB=$(OPENSSL_ROOT)/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/x64/release |
| 93 | + |
| 94 | +openssl: insdir |
| 95 | + [ -d $(INST_INC)/openssl ] || mkdir $(INST_INC)/openssl |
| 96 | + cp -r $(OPENSSL_INC)/* $(INST_INC)/openssl |
| 97 | + cp -r $(OPENSSL_LIB)/*.lib $(INST_LIB)/ |
| 98 | + cp -r $(OPENSSL_LIB)/*.dll $(INST_BIN)/ |
| 99 | + cp -r $(OPENSSL_LIB)/*.pdb $(INST_BIN)/ |
| 100 | + |
| 101 | +################################################################## |
| 102 | +## We place the zlib headers in their own subdirectory. |
| 103 | +## The custom is to reference <zlib.h>, so compile with: |
| 104 | +## -I$(INST_INC)/zlib |
| 105 | + |
| 106 | +ZLIB_VER=1.2.8.8 |
| 107 | +ZLIB_ROOT=$(PKGDIR)/zlib.v140.windesktop.msvcstl.dyn.rt-dyn.$(ZLIB_VER) |
| 108 | +ZLIB_INC=$(ZLIB_ROOT)/build/native/include |
| 109 | +ZLIB_LIB=$(ZLIB_ROOT)/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/x64/Release |
| 110 | + |
| 111 | +zlib: insdir |
| 112 | + [ -d $(INST_INC)/zlib ] || mkdir $(INST_INC)/zlib |
| 113 | + cp -r $(ZLIB_INC)/* $(INST_INC)/zlib |
| 114 | + cp -r $(ZLIB_LIB)/*.lib $(INST_LIB)/ |
| 115 | + cp -r $(ZLIB_LIB)/*.dll $(INST_BIN)/ |
| 116 | + |
| 117 | +################################################################## |
| 118 | +clean: |
| 119 | + rm -rf $(INST) |
| 120 | + |
| 121 | +clobber: clean |
| 122 | + rm -rf $(PKGDIR) |
0 commit comments