diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-18 12:58:55 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-18 12:58:55 (GMT) |
commit | 37e202ac7dc66bdb08a93b1ef9337ca330c4271f (patch) | |
tree | 4d45f4996c67621266a7ec0b34fb68d20241676f /win/makefile.vc | |
parent | 3ce435c13747183512cc8c2ff023487b9ffec74d (diff) | |
download | tcl-37e202ac7dc66bdb08a93b1ef9337ca330c4271f.zip tcl-37e202ac7dc66bdb08a93b1ef9337ca330c4271f.tar.gz tcl-37e202ac7dc66bdb08a93b1ef9337ca330c4271f.tar.bz2 |
Update makefile.vc and rules.vc for using libtommath.dll/zlib1.dll in stead of statically linking libtommath, whenever possible.
Diffstat (limited to 'win/makefile.vc')
-rw-r--r-- | win/makefile.vc | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index 9b58fb2..e22f5f9 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -210,6 +210,7 @@ TCLTESTOBJS = \ $(TMP_DIR)\tclWinReg.obj \
$(TMP_DIR)\tclWinDde.obj \
!endif
+ $(OUT_DIR)\tommath.lib \
!endif
$(TMP_DIR)\testMain.obj
@@ -303,6 +304,7 @@ COREOBJS = \ $(TMP_DIR)\tclZipfs.obj \
$(TMP_DIR)\tclZlib.obj
+!if $(STATIC_BUILD)
ZLIBOBJS = \
$(TMP_DIR)\adler32.obj \
$(TMP_DIR)\compress.obj \
@@ -315,7 +317,11 @@ ZLIBOBJS = \ $(TMP_DIR)\trees.obj \
$(TMP_DIR)\uncompr.obj \
$(TMP_DIR)\zutil.obj
+!else
+ZLIBOBJS = $(OUT_DIR)\zdll.lib
+!endif
+!if $(STATIC_BUILD)
TOMMATHOBJS = \
$(TMP_DIR)\bn_mp_add.obj \
$(TMP_DIR)\bn_mp_add_d.obj \
@@ -383,6 +389,9 @@ TOMMATHOBJS = \ $(TMP_DIR)\bn_s_mp_sub.obj \
$(TMP_DIR)\bn_s_mp_toom_sqr.obj \
$(TMP_DIR)\bn_s_mp_toom_mul.obj
+!else
+TOMMATHOBJS = $(OUT_DIR)\tommath.lib
+!endif
PLATFORMOBJS = \
$(TMP_DIR)\tclWin32Dll.obj \
@@ -443,7 +452,7 @@ TESTFLAGS = $(TESTFLAGS) -file $(TESTPAT) release: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs
core: setup $(TCLLIB) $(TCLSTUBLIB)
shell: setup $(TCLSH)
-dlls: setup $(TCLREGLIB) $(TCLDDELIB)
+dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll $(OUT_DIR)\libtommath.dll
all: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs
tcltest: setup $(TCLTEST) dlls
install: install-binaries install-libraries install-docs install-pkgs
@@ -516,6 +525,27 @@ $(TCLREGLIB): $(TMP_DIR)\tclWinReg.obj $(TCLSTUBLIB) $(_VC_MANIFEST_EMBED_DLL)
!endif
+!if "$(MACHINE)" == "AMD64"
+$(OUT_DIR)\zlib1.dll: $(COMPATDIR)\zlib\win64\zlib1.dll
+ $(COPY) $(COMPATDIR)\zlib\win64\zlib1.dll $(OUT_DIR)\zlib1.dll
+$(OUT_DIR)\zdll.lib: $(COMPATDIR)\zlib\win64\zdll.lib
+ $(COPY) $(COMPATDIR)\zlib\win64\zdll.lib $(OUT_DIR)\zdll.lib
+$(OUT_DIR)\libtommath.dll: $(TOMMATHDIR)\win64\libtommath.dll
+ $(COPY) $(TOMMATHDIR)\win64\libtommath.dll $(OUT_DIR)\libtommath.dll
+$(OUT_DIR)\tommath.lib: $(TOMMATHDIR)\win64\tommath.lib
+ $(COPY) $(TOMMATHDIR)\win64\tommath.lib $(OUT_DIR)\tommath.lib
+!else
+$(OUT_DIR)\zlib1.dll: $(COMPATDIR)\zlib\win32\zlib1.dll
+ $(COPY) $(COMPATDIR)\zlib\win32\zlib1.dll $(OUT_DIR)\zlib1.dll
+$(OUT_DIR)\zdll.lib: $(COMPATDIR)\zlib\win32\zdll.lib
+ $(COPY) $(COMPATDIR)\zlib\win32\zdll.lib $(OUT_DIR)\zdll.lib
+$(OUT_DIR)\libtommath.dll: $(TOMMATHDIR)\win32\libtommath.dll
+ $(COPY) $(TOMMATHDIR)\win32\libtommath.dll $(OUT_DIR)\libtommath.dll
+$(OUT_DIR)\tommath.lib: $(TOMMATHDIR)\win32\tommath.lib
+ $(COPY) $(TOMMATHDIR)\win32\tommath.lib $(OUT_DIR)\tommath.lib
+!endif
+
+
pkgs:
@for /d %d in ($(PKGSDIR)\*) do \
@if exist "%~fd\win\makefile.vc" ( \
@@ -853,6 +883,8 @@ install-binaries: @$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\"
!endif
@$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\"
+ @$(CPY) "$(OUT_DIR)\zlib1.dll" "$(BIN_INSTALL_DIR)\"
+ @$(CPY) "$(OUT_DIR)\libtommath.dll" "$(BIN_INSTALL_DIR)\"
!if exist($(TCLSH))
@echo Installing $(TCLSHNAME)
@$(CPY) "$(TCLSH)" "$(BIN_INSTALL_DIR)\"
|