| | @@ -486,10 +486,18 @@ |
| 486 | 486 | ifndef MINGW_IS_32BIT_ONLY |
| 487 | 487 | ifeq (,$(findstring w64-mingw32,$(PREFIX))) |
| 488 | 488 | MINGW_IS_32BIT_ONLY = 1 |
| 489 | 489 | endif |
| 490 | 490 | endif |
| 491 | +ifeq (,$(findstring x86_64-w64-mingw32,$(PREFIX))) |
| 492 | +SSLCONFIG = mingw |
| 493 | +else |
| 494 | +SSLCONFIG = mingw64 |
| 495 | +endif |
| 496 | +ifndef FOSSIL_ENABLE_MINIZ |
| 497 | +SSLCONFIG += --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib |
| 498 | +endif |
| 491 | 499 | |
| 492 | 500 | #### The directories where the zlib include and library files are located. |
| 493 | 501 | # |
| 494 | 502 | ZINCDIR = $(SRCDIR)/../compat/zlib |
| 495 | 503 | ZLIBDIR = $(SRCDIR)/../compat/zlib |
| | @@ -859,15 +867,11 @@ |
| 859 | 867 | ifndef FOSSIL_ENABLE_MINIZ |
| 860 | 868 | LIBTARGETS += zlib |
| 861 | 869 | endif |
| 862 | 870 | |
| 863 | 871 | openssl: $(LIBTARGETS) |
| 864 | | -ifndef FOSSIL_ENABLE_MINIZ |
| 865 | | - cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) --with-zlib-lib=$(PWD)/$(ZLIBDIR) --with-zlib-include=$(PWD)/$(ZLIBDIR) zlib mingw |
| 866 | | -else |
| 867 | | - cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) mingw |
| 868 | | -endif |
| 872 | + cd $(OPENSSLLIBDIR);./Configure --cross-compile-prefix=$(PREFIX) $(SSLCONFIG) |
| 869 | 873 | $(MAKE) -C $(OPENSSLLIBDIR) build_libs |
| 870 | 874 | |
| 871 | 875 | clean-openssl: |
| 872 | 876 | $(MAKE) -C $(OPENSSLLIBDIR) clean |
| 873 | 877 | |
| | @@ -1141,10 +1145,18 @@ |
| 1141 | 1145 | |
| 1142 | 1146 | writeln {# |
| 1143 | 1147 | ############################################################################## |
| 1144 | 1148 | # WARNING: DO NOT EDIT, AUTOMATICALLY GENERATED FILE (SEE "src/makemake.tcl") |
| 1145 | 1149 | ############################################################################## |
| 1150 | +# |
| 1151 | +# This Makefile will only function correctly if used from a sub-directory |
| 1152 | +# that is a direct child of the top-level directory for this project. |
| 1153 | +# |
| 1154 | +!if !exist("..\.fossil-settings") |
| 1155 | +!error "Please change the current directory to the one containing this file." |
| 1156 | +!endif |
| 1157 | + |
| 1146 | 1158 | # |
| 1147 | 1159 | # This file is automatically generated. Instead of editing this |
| 1148 | 1160 | # file, edit "makemake.tcl" then run "tclsh makemake.tcl" |
| 1149 | 1161 | # to regenerate this file. |
| 1150 | 1162 | # |
| | @@ -1171,10 +1183,13 @@ |
| 1171 | 1183 | # Uncomment to enable miniz usage |
| 1172 | 1184 | # FOSSIL_ENABLE_MINIZ = 1 |
| 1173 | 1185 | |
| 1174 | 1186 | # Uncomment to enable SSL support |
| 1175 | 1187 | # FOSSIL_ENABLE_SSL = 1 |
| 1188 | + |
| 1189 | +# Uncomment to build SSL libraries |
| 1190 | +# FOSSIL_BUILD_SSL = 1 |
| 1176 | 1191 | |
| 1177 | 1192 | # Uncomment to enable TH1 scripts in embedded documentation files |
| 1178 | 1193 | # FOSSIL_ENABLE_TH1_DOCS = 1 |
| 1179 | 1194 | |
| 1180 | 1195 | # Uncomment to enable TH1 hooks |
| | @@ -1186,10 +1201,26 @@ |
| 1186 | 1201 | !ifdef FOSSIL_ENABLE_SSL |
| 1187 | 1202 | SSLDIR = $(B)\compat\openssl-1.0.1i |
| 1188 | 1203 | SSLINCDIR = $(SSLDIR)\inc32 |
| 1189 | 1204 | SSLLIBDIR = $(SSLDIR)\out32 |
| 1190 | 1205 | SSLLIB = ssleay32.lib libeay32.lib user32.lib gdi32.lib |
| 1206 | +!if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1207 | +!message Using 'x64' platform for OpenSSL... |
| 1208 | +SSLCONFIG = VC-WIN64A no-asm |
| 1209 | +SSLSETUP = ms\do_win64a.bat |
| 1210 | +SSLNMAKE = ms\nt.mak all |
| 1211 | +!elseif "$(PLATFORM)"=="ia64" |
| 1212 | +!message Using 'ia64' platform for OpenSSL... |
| 1213 | +SSLCONFIG = VC-WIN64I no-asm |
| 1214 | +SSLSETUP = ms\do_win64i.bat |
| 1215 | +SSLNMAKE = ms\nt.mak all |
| 1216 | +!else |
| 1217 | +!message Assuming 'x86' platform for OpenSSL... |
| 1218 | +SSLCONFIG = VC-WIN32 no-asm |
| 1219 | +SSLSETUP = ms\do_ms.bat |
| 1220 | +SSLNMAKE = ms\nt.mak all |
| 1221 | +!endif |
| 1191 | 1222 | !endif |
| 1192 | 1223 | |
| 1193 | 1224 | !ifdef FOSSIL_ENABLE_TCL |
| 1194 | 1225 | TCLDIR = $(B)\compat\tcl-8.6 |
| 1195 | 1226 | TCLSRCDIR = $(TCLDIR) |
| | @@ -1329,21 +1360,23 @@ |
| 1329 | 1360 | openssl: |
| 1330 | 1361 | @echo Building OpenSSL from "$(SSLDIR)"... |
| 1331 | 1362 | !if "$(PERLDIR)" != "" |
| 1332 | 1363 | @set PATH=$(PERLDIR);$(PATH) |
| 1333 | 1364 | !endif |
| 1334 | | - @pushd "$(SSLDIR)" && $(PERL) Configure VC-WIN32 no-asm && popd |
| 1335 | | - @pushd "$(SSLDIR)" && call ms\do_ms.bat && popd |
| 1336 | | - @pushd "$(SSLDIR)" && $(MAKE) /f ms\nt.mak all && popd |
| 1365 | + @pushd "$(SSLDIR)" && $(PERL) Configure $(SSLCONFIG) && popd |
| 1366 | + @pushd "$(SSLDIR)" && call $(SSLSETUP) && popd |
| 1367 | + @pushd "$(SSLDIR)" && $(MAKE) /f $(SSLNMAKE) && popd |
| 1337 | 1368 | !endif |
| 1338 | 1369 | |
| 1339 | 1370 | !ifndef FOSSIL_ENABLE_MINIZ |
| 1340 | 1371 | APPTARGETS = $(APPTARGETS) zlib |
| 1341 | 1372 | !endif |
| 1342 | 1373 | |
| 1343 | 1374 | !ifdef FOSSIL_ENABLE_SSL |
| 1375 | +!ifdef FOSSIL_BUILD_SSL |
| 1344 | 1376 | APPTARGETS = $(APPTARGETS) openssl |
| 1377 | +!endif |
| 1345 | 1378 | !endif |
| 1346 | 1379 | |
| 1347 | 1380 | $(APPNAME) : $(APPTARGETS) translate$E mkindex$E headers $(OBJ) $(OX)\linkopts |
| 1348 | 1381 | cd $(OX) |
| 1349 | 1382 | link $(LDFLAGS) /OUT:$@ $(LIBDIR) Wsetargv.obj fossil.res @linkopts |
| 1350 | 1383 | |