2021-04-08 04:41:35 +08:00
|
|
|
diff --git "a/win32/Makefile.msvc" "b/win32/Makefile.msvc"
|
|
|
|
index 2e4742bb..8bfe7d83 100644
|
|
|
|
--- "a/win32/Makefile.msvc"
|
|
|
|
+++ "b/win32/Makefile.msvc"
|
2016-11-22 16:44:37 +08:00
|
|
|
@@ -59,7 +59,13 @@ CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
|
|
|
LD = link.exe
|
|
|
|
LDFLAGS = /nologo
|
|
|
|
LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
|
2021-04-08 04:41:35 +08:00
|
|
|
-LIBS =
|
2016-11-22 16:44:37 +08:00
|
|
|
+# The libraries are needed for static builds (the makefile builds all tools and dlls)
|
2021-04-08 04:41:35 +08:00
|
|
|
+LIBS = iconv.lib charset.lib ws2_32.lib
|
2016-11-22 16:44:37 +08:00
|
|
|
+!if "$(DEBUG)" == "1"
|
2021-04-08 04:41:35 +08:00
|
|
|
+LIBS = $(LIBS) zlibd.lib lzmad.lib
|
2016-11-22 16:44:37 +08:00
|
|
|
+!else
|
2021-04-08 04:41:35 +08:00
|
|
|
+LIBS = $(LIBS) zlib.lib lzma.lib
|
2016-11-22 16:44:37 +08:00
|
|
|
+!endif
|
|
|
|
|
|
|
|
# The archiver and its options.
|
|
|
|
AR = lib.exe
|
2021-04-08 04:41:35 +08:00
|
|
|
@@ -71,8 +77,14 @@ CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7
|
2016-11-22 16:44:37 +08:00
|
|
|
LDFLAGS = $(LDFLAGS) /DEBUG
|
|
|
|
!else
|
|
|
|
CFLAGS = $(CFLAGS) /D "NDEBUG" /O2
|
|
|
|
+LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF /OPT:ICF
|
|
|
|
!endif
|
|
|
|
|
2021-04-08 04:41:35 +08:00
|
|
|
+# append CFLAGS etc. passed on command line
|
|
|
|
+CPPFLAGS = $(CPPFLAGS) $(EXTRA_CPPFLAGS)
|
|
|
|
+CFLAGS = $(CFLAGS) $(EXTRA_CFLAGS)
|
|
|
|
+LDFLAGS = $(LDFLAGS) $(EXTRA_LDFLAGS)
|
|
|
|
+
|
2016-11-22 16:44:37 +08:00
|
|
|
# Libxslt object files.
|
2021-04-08 04:41:35 +08:00
|
|
|
XSLT_OBJS = $(XSLT_INTDIR)\attributes.obj\
|
|
|
|
$(XSLT_INTDIR)\documents.obj\
|
|
|
|
@@ -309,13 +321,7 @@ $(UTILS_INTDIR) :
|
2016-11-22 16:44:37 +08:00
|
|
|
# An implicit rule for xsltproc and friends.
|
|
|
|
APPLIBS = $(LIBS)
|
|
|
|
!if "$(STATIC)" == "1"
|
|
|
|
-APPLIBS = $(LIBS) libxml2_a.lib
|
|
|
|
-!if "$(WITH_ICONV)" == "1"
|
|
|
|
-APPLIBS = $(APPLIBS) iconv.lib
|
|
|
|
-!endif
|
|
|
|
-!if "$(WITH_ZLIB)" == "1"
|
|
|
|
-APPLIBS = $(APPLIBS) zlib.lib
|
|
|
|
-!endif
|
|
|
|
+APPLIBS = $(LIBS) libxml2.lib
|
|
|
|
{$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
|
|
|
|
$(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "LIBEXSLT_STATIC" \
|
|
|
|
$(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $<
|