Commit cdbca7fd authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Build windows as a static library

parent cd48111a
......@@ -53,18 +53,11 @@ pushd "$LIBWEBP_SOURCE_DIR"
archflag="x64"
fi
nmake /f Makefile.vc CFG=debug-dynamic RTLIBCFG=dynamic OBJDIR=output ARCH=$archflag
nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=dynamic OBJDIR=output ARCH=$archflag
cp -a output/debug-dynamic/$archflag/bin/*.dll $stage/lib/debug/
cp -a output/debug-dynamic/$archflag/lib/*.lib $stage/lib/debug/
cp -a output/debug-dynamic/$archflag/lib/*.exp $stage/lib/debug/
cp -a output/debug-dynamic/$archflag/lib/*.pdb $stage/lib/debug/
cp -a output/release-dynamic/$archflag/bin/*.dll $stage/lib/release/
cp -a output/release-dynamic/$archflag/lib/*.lib $stage/lib/release/
cp -a output/release-dynamic/$archflag/lib/*.exp $stage/lib/release/
cp -a output/release-dynamic/$archflag/lib/*.pdb $stage/lib/release/
nmake /f Makefile.vc CFG=debug-static RTLIBCFG=dynamic OBJDIR=output ARCH=$archflag
nmake /f Makefile.vc CFG=release-static RTLIBCFG=dynamic OBJDIR=output ARCH=$archflag
cp -a output/debug-static/$archflag/lib/*.lib $stage/lib/debug/
cp -a output/release-static/$archflag/lib/*.lib $stage/lib/release/
cp -a src/webp/decode.h $stage/include/webp/
cp -a src/webp/encode.h $stage/include/webp/
......
......@@ -27,8 +27,8 @@ PLATFORM_LDFLAGS = /SAFESEH
## Nothing more to do below this line!
NOLOGO = /nologo
CCNODBG = cl.exe $(NOLOGO) /O2 /Ob3 /Zi /DNDEBUG
CCDEBUG = cl.exe $(NOLOGO) /Od /Gm /Zi /D_DEBUG /RTC1
CCNODBG = cl.exe $(NOLOGO) /O2 /Ob3 /DNDEBUG
CCDEBUG = cl.exe $(NOLOGO) /Od /Gm /D_DEBUG /RTC1
CFLAGS = /I. /Isrc $(NOLOGO) /W3 /EHsc /c
CFLAGS = $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN
LDFLAGS = /LARGEADDRESSAWARE /MANIFEST /NXCOMPAT /DYNAMICBASE /DEBUG:FULL
......@@ -86,10 +86,10 @@ OUTPUT_DIRS = $(DIRBIN) $(DIRINC) $(DIRLIB) \
# Target configuration
!IF "$(CFG)" == "release-static"
CC = $(CCNODBG)
CC = $(CCNODBG) /Z7
STATICLIBBUILD = TRUE
!ELSE IF "$(CFG)" == "debug-static"
CC = $(CCDEBUG)
CC = $(CCDEBUG) /Z7
RTLIB = $(RTLIBD)
STATICLIBBUILD = TRUE
LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug
......@@ -97,13 +97,13 @@ LIBWEBP_BASENAME = $(LIBWEBP_BASENAME)_debug
LIBWEBPMUX_BASENAME = $(LIBWEBPMUX_BASENAME)_debug
LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug
!ELSE IF "$(CFG)" == "release-dynamic"
CC = $(CCNODBG)
CC = $(CCNODBG) /Zi
RC = $(RCNODBG)
CFLAGS = $(CFLAGS) /GL /Gy
LDFLAGS = $(LDFLAGS) /LTCG
DLLBUILD = TRUE
!ELSE IF "$(CFG)" == "debug-dynamic"
CC = $(CCDEBUG)
CC = $(CCDEBUG) /Zi
RC = $(RCDEBUG)
RTLIB = $(RTLIBD)
DLLBUILD = TRUE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment