Add support for x64 and SSE2 builds under Windows.

This commit is contained in:
Mikolaj Zalewski 2011-05-26 16:50:46 +02:00
parent 92e5c6e1d4
commit 72229f5f34
2 changed files with 16 additions and 1 deletions

View File

@ -15,8 +15,17 @@ DEPS_PATH = ../../deps
!ENDIF
!IFNDEF ARCH
!IFDEF TARGET_CPU
ARCH = $(TARGET_CPU)
!ELSE
ARCH = x86
!ENDIF
!ENDIF
!IF "$(TARGET_CPU)" == "x86"
PLATFORM_LDFLAGS = /SAFESEH
PLATFORM_SSE2 = /arch:SSE2
!ENDIF
#############################################################
## Nothing more to do below this line!
@ -25,7 +34,7 @@ MT = mt.exe
CCNODBG = cl.exe /nologo /O2 /DNDEBUG
CCDEBUG = cl.exe /nologo /Od /Gm /Zi /D_DEBUG /RTC1
CFLAGS = /Isrc /nologo /W3 /EHsc /DWIN32 /FD /c /GS /D_CRT_SECURE_NO_WARNINGS
LDFLAGS = /LARGEADDRESSAWARE /MANIFEST /NXCOMPAT /SAFESEH /DYNAMICBASE
LDFLAGS = /LARGEADDRESSAWARE /MANIFEST /NXCOMPAT /DYNAMICBASE $(PLATFORM_LDFLAGS)
CFLAGSLIB = /DLIBWEBP_STATICLIB
LNKDLL = link.exe /DLL
LNKLIB = link.exe /lib
@ -128,6 +137,7 @@ X_OBJS= \
$(DIROBJ)\enc\config.obj \
$(DIROBJ)\enc\cost.obj \
$(DIROBJ)\enc\dsp.obj \
$(DIROBJ)\enc\dsp_sse2.obj \
$(DIROBJ)\enc\frame.obj \
$(DIROBJ)\enc\filter.obj \
$(DIROBJ)\enc\iterator.obj \
@ -179,6 +189,9 @@ $(DIRINC):
$(DIRBIN):
@if not exist "$(DIRBIN)" mkdir $(DIRBIN)
# Special case - compile with SSE2.
$(DIROBJ)\enc\dsp_sse2.obj: src\enc\dsp_sse2.c
$(CC) $(CFLAGS) $(PLATFORM_SSE2) /Fo"$@" src\enc\dsp_sse2.c
.SUFFIXES: .c .obj .res .exe
{examples}.c{$(DIROBJ)\examples}.obj:
$(CC) $(CFLAGS) /Fo"$@" $<

View File

@ -13,7 +13,9 @@
#include <stdlib.h>
#include "vp8enci.h"
#ifdef WEBP_EXPERIMENTAL_FEATURES
#include "zlib.h"
#endif
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {