2011-02-19 08:33:46 +01:00
|
|
|
#
|
|
|
|
# Stem for static libs and DLLs
|
|
|
|
#
|
2013-03-15 20:15:59 +01:00
|
|
|
LIBWEBPDECODER_BASENAME = libwebpdecoder
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBP_BASENAME = libwebp
|
|
|
|
LIBWEBPMUX_BASENAME = libwebpmux
|
2012-11-19 20:21:37 +01:00
|
|
|
LIBWEBPDEMUX_BASENAME = libwebpdemux
|
2011-02-19 08:33:46 +01:00
|
|
|
|
|
|
|
!IFNDEF ARCH
|
2011-06-01 03:58:01 +02:00
|
|
|
!IF ! [ cl 2>&1 | find "x86" > NUL ]
|
|
|
|
ARCH = x86
|
|
|
|
!ELSE IF ! [ cl 2>&1 | find "x64" > NUL ]
|
|
|
|
ARCH = x64
|
2015-01-10 04:09:14 +01:00
|
|
|
!ELSE IF ! [ cl 2>&1 | find "ARM" > NUL ]
|
|
|
|
ARCH = ARM
|
2011-05-26 16:50:46 +02:00
|
|
|
!ELSE
|
2011-06-01 03:58:01 +02:00
|
|
|
!ERROR Unable to auto-detect toolchain architecture! \
|
|
|
|
If cl.exe is in your PATH rerun nmake with ARCH=<arch>.
|
2011-02-19 08:33:46 +01:00
|
|
|
!ENDIF
|
2011-05-26 16:50:46 +02:00
|
|
|
!ENDIF
|
|
|
|
|
2011-06-01 03:58:01 +02:00
|
|
|
!IF "$(ARCH)" == "x86"
|
2011-05-26 16:50:46 +02:00
|
|
|
PLATFORM_LDFLAGS = /SAFESEH
|
|
|
|
!ENDIF
|
2011-02-19 08:33:46 +01:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
## Nothing more to do below this line!
|
|
|
|
|
2013-04-06 03:45:53 +02:00
|
|
|
NOLOGO = /nologo
|
|
|
|
CCNODBG = cl.exe $(NOLOGO) /O2 /DNDEBUG
|
|
|
|
CCDEBUG = cl.exe $(NOLOGO) /Od /Gm /Zi /D_DEBUG /RTC1
|
2014-10-23 16:57:34 +02:00
|
|
|
CFLAGS = /Isrc $(NOLOGO) /W3 /EHsc /c
|
2011-08-05 03:40:03 +02:00
|
|
|
CFLAGS = $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN
|
2011-10-04 22:46:09 +02:00
|
|
|
LDFLAGS = /LARGEADDRESSAWARE /MANIFEST /NXCOMPAT /DYNAMICBASE
|
|
|
|
LDFLAGS = $(LDFLAGS) $(PLATFORM_LDFLAGS)
|
2013-04-06 03:45:53 +02:00
|
|
|
LNKDLL = link.exe /DLL $(NOLOGO)
|
|
|
|
LNKEXE = link.exe $(NOLOGO)
|
|
|
|
LNKLIB = lib.exe $(NOLOGO)
|
|
|
|
MT = mt.exe $(NOLOGO)
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2015-01-10 04:09:14 +01:00
|
|
|
!IF "$(ARCH)" == "ARM"
|
|
|
|
CFLAGS = $(CFLAGS) /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
|
|
|
|
!ELSE
|
|
|
|
CFLAGS = $(CFLAGS) /DHAVE_WINCODEC_H /DWEBP_USE_THREAD
|
|
|
|
!ENDIF
|
|
|
|
|
2011-02-19 08:33:46 +01:00
|
|
|
CFGSET = FALSE
|
|
|
|
!IF "$(OBJDIR)" == ""
|
|
|
|
OUTDIR = ..\obj\
|
|
|
|
!ELSE
|
|
|
|
OUTDIR = $(OBJDIR)
|
|
|
|
!ENDIF
|
|
|
|
|
2014-05-24 05:13:01 +02:00
|
|
|
!IF "$(HAVE_AVX2)" == "1"
|
2014-06-17 05:23:20 +02:00
|
|
|
CFLAGS = $(CFLAGS) /DWEBP_HAVE_AVX2
|
2014-05-24 05:13:01 +02:00
|
|
|
AVX2_FLAGS = /arch:AVX2
|
|
|
|
!ENDIF
|
|
|
|
|
2011-02-19 08:33:46 +01:00
|
|
|
##############################################################
|
|
|
|
# Runtime library configuration
|
|
|
|
!IF "$(RTLIBCFG)" == "static"
|
|
|
|
RTLIB = /MT
|
|
|
|
RTLIBD = /MTd
|
2014-10-23 16:57:34 +02:00
|
|
|
!ELSE IF "$(RTLIBCFG)" == "legacy"
|
|
|
|
RTLIBCFG = static
|
|
|
|
RTLIB = /MT
|
|
|
|
RTLIBD = /MTd
|
|
|
|
CFLAGS = $(CFLAGS) /GS- /arch:IA32
|
2011-02-19 08:33:46 +01:00
|
|
|
!ELSE
|
|
|
|
RTLIB = /MD
|
|
|
|
RTLIBD = /MDd
|
|
|
|
!ENDIF
|
|
|
|
DIRBASE = $(OUTDIR)\$(CFG)\$(ARCH)
|
|
|
|
DIROBJ = $(DIRBASE)\obj
|
|
|
|
DIRLIB = $(DIRBASE)\lib
|
|
|
|
DIRINC = $(DIRBASE)\include
|
|
|
|
DIRBIN = $(DIRBASE)\bin
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBP_PDBNAME = $(DIROBJ)\$(LIBWEBP_BASENAME).pdb
|
2011-10-04 22:39:39 +02:00
|
|
|
OUTPUT_DIRS = $(DIRBIN) $(DIRINC) $(DIRLIB) \
|
|
|
|
$(DIROBJ)\dec \
|
2012-11-19 20:21:37 +01:00
|
|
|
$(DIROBJ)\demux \
|
2011-10-04 22:39:39 +02:00
|
|
|
$(DIROBJ)\dsp \
|
|
|
|
$(DIROBJ)\enc \
|
|
|
|
$(DIROBJ)\examples \
|
|
|
|
$(DIROBJ)\mux \
|
|
|
|
$(DIROBJ)\utils \
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2011-07-15 23:53:03 +02:00
|
|
|
# Target configuration
|
2011-02-19 08:33:46 +01:00
|
|
|
!IF "$(CFG)" == "release-static"
|
2011-07-15 23:53:03 +02:00
|
|
|
CC = $(CCNODBG)
|
|
|
|
STATICLIBBUILD = TRUE
|
|
|
|
!ELSE IF "$(CFG)" == "debug-static"
|
|
|
|
CC = $(CCDEBUG)
|
2012-02-21 22:44:39 +01:00
|
|
|
RTLIB = $(RTLIBD)
|
2011-07-15 23:53:03 +02:00
|
|
|
STATICLIBBUILD = TRUE
|
2013-03-15 20:15:59 +01:00
|
|
|
LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBP_BASENAME = $(LIBWEBP_BASENAME)_debug
|
|
|
|
LIBWEBPMUX_BASENAME = $(LIBWEBPMUX_BASENAME)_debug
|
2012-11-19 20:21:37 +01:00
|
|
|
LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug
|
2011-07-15 23:53:03 +02:00
|
|
|
!ELSE IF "$(CFG)" == "release-dynamic"
|
|
|
|
CC = $(CCNODBG)
|
|
|
|
DLLBUILD = TRUE
|
|
|
|
!ELSE IF "$(CFG)" == "debug-dynamic"
|
|
|
|
CC = $(CCDEBUG)
|
2012-02-21 22:44:39 +01:00
|
|
|
RTLIB = $(RTLIBD)
|
2011-07-15 23:53:03 +02:00
|
|
|
DLLBUILD = TRUE
|
2013-03-15 20:15:59 +01:00
|
|
|
LIBWEBPDECODER_BASENAME = $(LIBWEBPDECODER_BASENAME)_debug
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBP_BASENAME = $(LIBWEBP_BASENAME)_debug
|
|
|
|
LIBWEBPMUX_BASENAME = $(LIBWEBPMUX_BASENAME)_debug
|
2012-11-19 20:21:37 +01:00
|
|
|
LIBWEBPDEMUX_BASENAME = $(LIBWEBPDEMUX_BASENAME)_debug
|
2011-02-19 08:33:46 +01:00
|
|
|
!ENDIF
|
|
|
|
|
2011-07-15 23:53:03 +02:00
|
|
|
!IF "$(STATICLIBBUILD)" == "TRUE"
|
|
|
|
CC = $(CC) $(RTLIB)
|
|
|
|
CFGSET = TRUE
|
2013-03-15 20:15:59 +01:00
|
|
|
LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME).lib
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME).lib
|
|
|
|
LIBWEBPMUX = $(DIRLIB)\$(LIBWEBPMUX_BASENAME).lib
|
2012-11-19 20:21:37 +01:00
|
|
|
LIBWEBPDEMUX = $(DIRLIB)\$(LIBWEBPDEMUX_BASENAME).lib
|
2011-07-15 23:53:03 +02:00
|
|
|
!ELSE IF "$(DLLBUILD)" == "TRUE"
|
2012-02-21 22:44:39 +01:00
|
|
|
DLLC = webp_dll.c
|
2011-07-15 23:53:03 +02:00
|
|
|
DLLINC = webp_dll.h
|
2013-03-15 20:15:59 +01:00
|
|
|
DLL_OBJS = $(DIROBJ)\$(DLLC:.c=.obj)
|
2011-07-15 23:53:03 +02:00
|
|
|
CC = $(CC) /I$(DIROBJ) /FI$(DLLINC) $(RTLIB) /DWEBP_DLL
|
2013-03-22 03:30:34 +01:00
|
|
|
LIBWEBPDECODER = $(DIRLIB)\$(LIBWEBPDECODER_BASENAME)_dll.lib
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBP = $(DIRLIB)\$(LIBWEBP_BASENAME)_dll.lib
|
|
|
|
LIBWEBPMUX = $(DIRLIB)\$(LIBWEBPMUX_BASENAME)_dll.lib
|
2013-05-10 08:47:30 +02:00
|
|
|
LIBWEBPDEMUX = $(DIRLIB)\$(LIBWEBPDEMUX_BASENAME)_dll.lib
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBP_PDBNAME = $(DIROBJ)\$(LIBWEBP_BASENAME)_dll.pdb
|
2011-02-19 08:33:46 +01:00
|
|
|
CFGSET = TRUE
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
#######################
|
|
|
|
# Usage
|
|
|
|
#
|
|
|
|
!IF "$(CFGSET)" == "FALSE"
|
2011-10-04 22:46:09 +02:00
|
|
|
!MESSAGE Usage: nmake /f Makefile.vc [CFG=<config>]
|
|
|
|
!MESSAGE . [OBJDIR=<path>] [RTLIBCFG=<rtlib>] [<target>]
|
|
|
|
!MESSAGE
|
2011-02-19 08:33:46 +01:00
|
|
|
!MESSAGE where <config> is one of:
|
|
|
|
!MESSAGE - release-static - release static library
|
|
|
|
!MESSAGE - debug-static - debug static library
|
2011-07-15 23:53:03 +02:00
|
|
|
!MESSAGE - release-dynamic - release dynamic link library (DLL)
|
|
|
|
!MESSAGE - debug-dynamic - debug dynamic link library (DLL)
|
2011-10-04 22:46:09 +02:00
|
|
|
!MESSAGE
|
2011-06-02 00:55:22 +02:00
|
|
|
!MESSAGE <target> may be:
|
|
|
|
!MESSAGE - clean - perform a clean for CFG
|
2011-06-17 20:50:21 +02:00
|
|
|
!MESSAGE - experimental - build CFG with experimental
|
2012-04-21 01:20:32 +02:00
|
|
|
!MESSAGE . features enabled.
|
2013-04-06 04:21:01 +02:00
|
|
|
!MESSAGE - (empty) - build libwebp-based targets for CFG
|
|
|
|
!MESSAGE - all - build (de)mux-based targets for CFG
|
2015-01-10 05:26:46 +01:00
|
|
|
!MESSAGE - gif2webp - requires libgif & >= VS2013
|
2011-02-19 08:33:46 +01:00
|
|
|
!MESSAGE
|
2011-10-04 22:46:09 +02:00
|
|
|
!MESSAGE RTLIBCFG controls the runtime library linkage - 'static' or 'dynamic'.
|
2014-10-23 16:57:34 +02:00
|
|
|
!MESSAGE 'legacy' will produce a Windows 2000 compatible library.
|
2011-10-04 22:46:09 +02:00
|
|
|
!MESSAGE OBJDIR is the path where you like to build (obj, bins, etc.),
|
|
|
|
!MESSAGE defaults to ..\obj
|
2011-02-19 08:33:46 +01:00
|
|
|
|
|
|
|
!IF "$(CFG)" != ""
|
|
|
|
!MESSAGE
|
|
|
|
!ERROR please choose a valid configuration instead of "$(CFG)"
|
|
|
|
!ENDIF
|
|
|
|
!ENDIF
|
|
|
|
|
|
|
|
#######################
|
2011-06-02 00:55:22 +02:00
|
|
|
# Rules
|
2011-02-19 08:33:46 +01:00
|
|
|
#
|
2011-06-02 00:55:22 +02:00
|
|
|
!IF "$(CFGSET)" == "TRUE"
|
2011-02-19 08:33:46 +01:00
|
|
|
# A config was provided, so the library can be built.
|
|
|
|
#
|
|
|
|
|
2012-04-20 02:14:23 +02:00
|
|
|
DEC_OBJS = \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\dec\alpha.obj \
|
|
|
|
$(DIROBJ)\dec\buffer.obj \
|
|
|
|
$(DIROBJ)\dec\frame.obj \
|
|
|
|
$(DIROBJ)\dec\idec.obj \
|
|
|
|
$(DIROBJ)\dec\io.obj \
|
|
|
|
$(DIROBJ)\dec\quant.obj \
|
|
|
|
$(DIROBJ)\dec\tree.obj \
|
|
|
|
$(DIROBJ)\dec\vp8.obj \
|
2012-04-11 23:55:11 +02:00
|
|
|
$(DIROBJ)\dec\vp8l.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\dec\webp.obj \
|
2012-04-20 02:14:23 +02:00
|
|
|
|
2012-11-19 20:21:37 +01:00
|
|
|
DEMUX_OBJS = \
|
|
|
|
$(DIROBJ)\demux\demux.obj \
|
|
|
|
|
2013-03-15 20:15:59 +01:00
|
|
|
DSP_DEC_OBJS = \
|
2014-05-26 18:05:03 +02:00
|
|
|
$(DIROBJ)\dsp\alpha_processing.obj \
|
2014-08-21 19:26:18 +02:00
|
|
|
$(DIROBJ)\dsp\alpha_processing_mips_dsp_r2.obj \
|
2014-08-26 05:55:28 +02:00
|
|
|
$(DIROBJ)\dsp\alpha_processing_sse2.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\dsp\cpu.obj \
|
|
|
|
$(DIROBJ)\dsp\dec.obj \
|
2014-02-14 04:32:21 +01:00
|
|
|
$(DIROBJ)\dsp\dec_clip_tables.obj \
|
2013-12-25 12:16:01 +01:00
|
|
|
$(DIROBJ)\dsp\dec_mips32.obj \
|
2014-09-02 14:03:13 +02:00
|
|
|
$(DIROBJ)\dsp\dec_mips_dsp_r2.obj \
|
2013-03-15 20:15:59 +01:00
|
|
|
$(DIROBJ)\dsp\dec_neon.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\dsp\dec_sse2.obj \
|
2015-01-28 08:02:41 +01:00
|
|
|
$(DIROBJ)\dsp\filters.obj \
|
2014-08-04 16:22:10 +02:00
|
|
|
$(DIROBJ)\dsp\filters_mips_dsp_r2.obj \
|
2015-01-29 08:06:29 +01:00
|
|
|
$(DIROBJ)\dsp\filters_sse2.obj \
|
2012-04-11 23:55:11 +02:00
|
|
|
$(DIROBJ)\dsp\lossless.obj \
|
2014-03-24 14:47:19 +01:00
|
|
|
$(DIROBJ)\dsp\lossless_mips32.obj \
|
2014-09-02 16:34:52 +02:00
|
|
|
$(DIROBJ)\dsp\lossless_mips_dsp_r2.obj \
|
2014-03-31 16:36:33 +02:00
|
|
|
$(DIROBJ)\dsp\lossless_neon.obj \
|
2014-03-27 21:43:21 +01:00
|
|
|
$(DIROBJ)\dsp\lossless_sse2.obj \
|
2015-01-09 12:05:53 +01:00
|
|
|
$(DIROBJ)\dsp\rescaler.obj \
|
|
|
|
$(DIROBJ)\dsp\rescaler_mips32.obj \
|
|
|
|
$(DIROBJ)\dsp\rescaler_mips_dsp_r2.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\dsp\upsampling.obj \
|
2014-08-15 11:00:32 +02:00
|
|
|
$(DIROBJ)\dsp\upsampling_mips_dsp_r2.obj \
|
2013-03-15 20:15:59 +01:00
|
|
|
$(DIROBJ)\dsp\upsampling_neon.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\dsp\upsampling_sse2.obj \
|
|
|
|
$(DIROBJ)\dsp\yuv.obj \
|
2014-06-07 21:35:47 +02:00
|
|
|
$(DIROBJ)\dsp\yuv_mips32.obj \
|
2014-08-12 11:47:36 +02:00
|
|
|
$(DIROBJ)\dsp\yuv_mips_dsp_r2.obj \
|
2014-06-06 08:49:59 +02:00
|
|
|
$(DIROBJ)\dsp\yuv_sse2.obj \
|
2012-04-20 02:14:23 +02:00
|
|
|
|
2013-03-15 20:15:59 +01:00
|
|
|
DSP_ENC_OBJS = \
|
2015-01-07 09:11:57 +01:00
|
|
|
$(DIROBJ)\dsp\argb.obj \
|
|
|
|
$(DIROBJ)\dsp\argb_mips_dsp_r2.obj \
|
|
|
|
$(DIROBJ)\dsp\argb_sse2.obj \
|
2015-02-07 11:13:26 +01:00
|
|
|
$(DIROBJ)\dsp\cost.obj \
|
|
|
|
$(DIROBJ)\dsp\cost_mips32.obj \
|
|
|
|
$(DIROBJ)\dsp\cost_mips_dsp_r2.obj \
|
2013-03-15 20:15:59 +01:00
|
|
|
$(DIROBJ)\dsp\enc.obj \
|
2014-05-22 09:26:18 +02:00
|
|
|
$(DIROBJ)\dsp\enc_avx2.obj \
|
2014-02-19 15:33:50 +01:00
|
|
|
$(DIROBJ)\dsp\enc_mips32.obj \
|
2014-10-10 12:31:00 +02:00
|
|
|
$(DIROBJ)\dsp\enc_mips_dsp_r2.obj \
|
2013-03-15 20:15:59 +01:00
|
|
|
$(DIROBJ)\dsp\enc_neon.obj \
|
|
|
|
$(DIROBJ)\dsp\enc_sse2.obj \
|
|
|
|
|
2012-12-06 22:06:37 +01:00
|
|
|
EX_FORMAT_DEC_OBJS = \
|
2013-01-23 21:46:18 +01:00
|
|
|
$(DIROBJ)\examples\jpegdec.obj \
|
|
|
|
$(DIROBJ)\examples\metadata.obj \
|
|
|
|
$(DIROBJ)\examples\pngdec.obj \
|
|
|
|
$(DIROBJ)\examples\tiffdec.obj \
|
2014-04-23 04:30:27 +02:00
|
|
|
$(DIROBJ)\examples\webpdec.obj \
|
2013-01-23 21:46:18 +01:00
|
|
|
$(DIROBJ)\examples\wicdec.obj \
|
2012-12-06 22:06:37 +01:00
|
|
|
|
2015-01-14 00:43:31 +01:00
|
|
|
EX_GIF_DEC_OBJS = \
|
|
|
|
$(DIROBJ)\examples\gifdec.obj \
|
|
|
|
|
2012-05-12 01:00:57 +02:00
|
|
|
EX_UTIL_OBJS = \
|
|
|
|
$(DIROBJ)\examples\example_util.obj \
|
|
|
|
|
2012-04-20 02:14:23 +02:00
|
|
|
ENC_OBJS = \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\enc\alpha.obj \
|
|
|
|
$(DIROBJ)\enc\analysis.obj \
|
2012-05-21 15:22:06 +02:00
|
|
|
$(DIROBJ)\enc\backward_references.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\enc\config.obj \
|
|
|
|
$(DIROBJ)\enc\cost.obj \
|
|
|
|
$(DIROBJ)\enc\filter.obj \
|
|
|
|
$(DIROBJ)\enc\frame.obj \
|
2012-05-21 15:22:06 +02:00
|
|
|
$(DIROBJ)\enc\histogram.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\enc\iterator.obj \
|
2014-08-05 19:14:57 +02:00
|
|
|
$(DIROBJ)\enc\near_lossless.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\enc\picture.obj \
|
2014-07-14 11:04:14 +02:00
|
|
|
$(DIROBJ)\enc\picture_csp.obj \
|
2014-07-12 18:13:33 +02:00
|
|
|
$(DIROBJ)\enc\picture_psnr.obj \
|
|
|
|
$(DIROBJ)\enc\picture_rescale.obj \
|
2014-07-14 11:04:14 +02:00
|
|
|
$(DIROBJ)\enc\picture_tools.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\enc\quant.obj \
|
|
|
|
$(DIROBJ)\enc\syntax.obj \
|
2012-12-03 13:50:14 +01:00
|
|
|
$(DIROBJ)\enc\token.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\enc\tree.obj \
|
2012-05-21 15:22:06 +02:00
|
|
|
$(DIROBJ)\enc\vp8l.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\enc\webpenc.obj \
|
2012-04-20 02:14:23 +02:00
|
|
|
|
|
|
|
MUX_OBJS = \
|
2015-01-07 01:12:48 +01:00
|
|
|
$(DIROBJ)\mux\anim_encode.obj \
|
2012-01-05 07:50:37 +01:00
|
|
|
$(DIROBJ)\mux\muxedit.obj \
|
|
|
|
$(DIROBJ)\mux\muxinternal.obj \
|
|
|
|
$(DIROBJ)\mux\muxread.obj \
|
2012-04-20 02:14:23 +02:00
|
|
|
|
2013-03-15 20:15:59 +01:00
|
|
|
UTILS_DEC_OBJS = \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\utils\bit_reader.obj \
|
2012-04-11 23:55:11 +02:00
|
|
|
$(DIROBJ)\utils\color_cache.obj \
|
2012-01-05 08:34:30 +01:00
|
|
|
$(DIROBJ)\utils\filters.obj \
|
2012-04-11 23:55:11 +02:00
|
|
|
$(DIROBJ)\utils\huffman.obj \
|
2013-02-14 07:21:41 +01:00
|
|
|
$(DIROBJ)\utils\quant_levels_dec.obj \
|
2012-03-22 11:30:20 +01:00
|
|
|
$(DIROBJ)\utils\rescaler.obj \
|
2013-10-30 10:00:33 +01:00
|
|
|
$(DIROBJ)\utils\random.obj \
|
2011-10-04 22:46:09 +02:00
|
|
|
$(DIROBJ)\utils\thread.obj \
|
2012-08-01 01:56:39 +02:00
|
|
|
$(DIROBJ)\utils\utils.obj \
|
2012-04-20 02:14:23 +02:00
|
|
|
|
2013-03-15 20:15:59 +01:00
|
|
|
UTILS_ENC_OBJS = \
|
|
|
|
$(DIROBJ)\utils\bit_writer.obj \
|
|
|
|
$(DIROBJ)\utils\huffman_encode.obj \
|
|
|
|
$(DIROBJ)\utils\quant_levels.obj \
|
|
|
|
|
|
|
|
LIBWEBPDECODER_OBJS = $(DEC_OBJS) $(DSP_DEC_OBJS) $(UTILS_DEC_OBJS)
|
|
|
|
LIBWEBP_OBJS = $(LIBWEBPDECODER_OBJS) $(ENC_OBJS) $(DSP_ENC_OBJS) \
|
|
|
|
$(UTILS_ENC_OBJS) $(DLL_OBJS)
|
2012-04-21 01:20:32 +02:00
|
|
|
LIBWEBPMUX_OBJS = $(MUX_OBJS) $(LIBWEBPMUX_OBJS)
|
2012-11-19 20:21:37 +01:00
|
|
|
LIBWEBPDEMUX_OBJS = $(DEMUX_OBJS) $(LIBWEBPDEMUX_OBJS)
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2013-03-15 20:15:59 +01:00
|
|
|
OUT_LIBS = $(LIBWEBPDECODER) $(LIBWEBP)
|
2015-01-10 04:09:14 +01:00
|
|
|
!IF "$(ARCH)" == "ARM"
|
|
|
|
ex: $(OUT_LIBS)
|
|
|
|
all: ex
|
|
|
|
!ELSE
|
2012-04-24 03:46:12 +02:00
|
|
|
OUT_EXAMPLES = $(DIRBIN)\cwebp.exe $(DIRBIN)\dwebp.exe
|
2013-04-06 04:21:01 +02:00
|
|
|
EXTRA_EXAMPLES = $(DIRBIN)\vwebp.exe $(DIRBIN)\webpmux.exe
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2013-04-06 04:21:01 +02:00
|
|
|
ex: $(OUT_LIBS) $(OUT_EXAMPLES)
|
|
|
|
all: ex $(EXTRA_EXAMPLES)
|
2015-01-10 05:26:46 +01:00
|
|
|
# NB: gif2webp.exe is excluded from 'all' as libgif requires C99 support which
|
|
|
|
# is only available from VS2013 onward.
|
|
|
|
gif2webp: $(DIRBIN)\gif2webp.exe
|
|
|
|
|
2012-12-06 22:06:37 +01:00
|
|
|
$(DIRBIN)\cwebp.exe: $(DIROBJ)\examples\cwebp.obj $(EX_FORMAT_DEC_OBJS)
|
2012-04-21 01:20:32 +02:00
|
|
|
$(DIRBIN)\dwebp.exe: $(DIROBJ)\examples\dwebp.obj
|
2015-01-14 00:43:31 +01:00
|
|
|
$(DIRBIN)\gif2webp.exe: $(DIROBJ)\examples\gif2webp.obj $(EX_GIF_DEC_OBJS)
|
|
|
|
$(DIRBIN)\gif2webp.exe: $(EX_UTIL_OBJS) $(LIBWEBPMUX) $(LIBWEBP)
|
2013-03-15 20:18:25 +01:00
|
|
|
$(DIRBIN)\vwebp.exe: $(DIROBJ)\examples\vwebp.obj
|
|
|
|
$(DIRBIN)\vwebp.exe: $(EX_UTIL_OBJS) $(LIBWEBPDEMUX) $(LIBWEBP)
|
2012-04-21 01:20:32 +02:00
|
|
|
$(DIRBIN)\webpmux.exe: $(DIROBJ)\examples\webpmux.obj $(LIBWEBPMUX)
|
2012-04-24 03:46:12 +02:00
|
|
|
$(DIRBIN)\webpmux.exe: $(EX_UTIL_OBJS) $(LIBWEBP)
|
2012-04-21 01:20:32 +02:00
|
|
|
$(OUT_EXAMPLES): $(EX_UTIL_OBJS) $(LIBWEBP)
|
2013-04-06 04:21:01 +02:00
|
|
|
$(EX_UTIL_OBJS) $(EX_FORMAT_DEC_OBJS): $(OUTPUT_DIRS)
|
2015-01-10 04:09:14 +01:00
|
|
|
!ENDIF # ARCH == ARM
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2011-06-17 20:50:21 +02:00
|
|
|
experimental:
|
|
|
|
$(MAKE) /f Makefile.vc \
|
2011-10-04 22:46:09 +02:00
|
|
|
CFG=$(CFG) \
|
|
|
|
CFLAGS="$(CFLAGS) /DWEBP_EXPERIMENTAL_FEATURES" /$(MAKEFLAGS)
|
2011-06-17 20:50:21 +02:00
|
|
|
|
2013-03-15 20:15:59 +01:00
|
|
|
$(LIBWEBPDECODER): $(LIBWEBPDECODER_OBJS)
|
2012-04-21 01:20:32 +02:00
|
|
|
$(LIBWEBP): $(LIBWEBP_OBJS)
|
|
|
|
$(LIBWEBPMUX): $(LIBWEBPMUX_OBJS)
|
2012-11-19 20:21:37 +01:00
|
|
|
$(LIBWEBPDEMUX): $(LIBWEBPDEMUX_OBJS)
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2012-11-19 20:21:37 +01:00
|
|
|
$(LIBWEBP_OBJS) $(LIBWEBPMUX_OBJS) $(LIBWEBPDEMUX_OBJS): $(OUTPUT_DIRS)
|
2011-10-01 22:07:58 +02:00
|
|
|
|
2011-07-15 23:53:03 +02:00
|
|
|
!IF "$(DLLBUILD)" == "TRUE"
|
2013-03-22 03:30:34 +01:00
|
|
|
$(LIBWEBP_OBJS) $(LIBWEBPMUX_OBJS) $(LIBWEBPDEMUX_OBJS): \
|
|
|
|
$(DIROBJ)\$(DLLINC) $(DIROBJ)\$(DLLC)
|
2012-02-21 22:44:39 +01:00
|
|
|
|
|
|
|
{$(DIROBJ)}.c{$(DIROBJ)}.obj:
|
2012-04-21 01:20:32 +02:00
|
|
|
$(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$@ $<
|
|
|
|
|
|
|
|
$(LIBWEBPMUX): $(LIBWEBP)
|
2012-11-19 20:21:37 +01:00
|
|
|
$(LIBWEBPDEMUX): $(LIBWEBP)
|
2012-04-21 01:20:32 +02:00
|
|
|
|
2013-03-15 20:15:59 +01:00
|
|
|
$(LIBWEBPDECODER) $(LIBWEBP) $(LIBWEBPMUX) $(LIBWEBPDEMUX):
|
2012-04-21 01:20:32 +02:00
|
|
|
$(LNKDLL) /out:$(DIRBIN)\$(@B:_dll=.dll) /implib:$@ $(LFLAGS) $**
|
|
|
|
-xcopy $(DIROBJ)\*.pdb $(DIRLIB) /y
|
|
|
|
|
2011-07-23 03:40:35 +02:00
|
|
|
clean::
|
2012-02-21 22:44:39 +01:00
|
|
|
@-erase /s $(DIROBJ)\$(DLLC) $(DIROBJ)\$(DLLINC) 2> NUL
|
2012-04-21 01:20:32 +02:00
|
|
|
!ELSE
|
2013-03-15 20:15:59 +01:00
|
|
|
$(LIBWEBPDECODER) $(LIBWEBP) $(LIBWEBPMUX) $(LIBWEBPDEMUX):
|
2013-04-06 03:45:53 +02:00
|
|
|
$(LNKLIB) /out:$@ $**
|
2012-04-21 01:20:32 +02:00
|
|
|
-xcopy $(DIROBJ)\*.pdb $(DIRLIB) /y
|
2011-07-15 23:53:03 +02:00
|
|
|
!ENDIF
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2011-10-04 22:39:39 +02:00
|
|
|
$(OUTPUT_DIRS):
|
|
|
|
@if not exist "$(@)" mkdir "$(@)"
|
2011-02-19 08:33:46 +01:00
|
|
|
|
2011-07-15 23:53:03 +02:00
|
|
|
# generate a helper include to define WEBP_EXTERN suitable for the DLL build
|
|
|
|
$(DIROBJ)\$(DLLINC):
|
|
|
|
@echo #ifndef WEBP_DLL_H_ > $@
|
|
|
|
@echo #define WEBP_DLL_H_ >> $@
|
|
|
|
@echo #define WEBP_EXTERN(type) __declspec(dllexport) type >> $@
|
|
|
|
@echo #endif /* WEBP_DLL_H_ */ >> $@
|
|
|
|
|
2012-02-21 22:44:39 +01:00
|
|
|
# expose a WebPFree() function for use in managed code
|
|
|
|
$(DIROBJ)\$(DLLC): $(DIROBJ)\$(DLLINC)
|
|
|
|
@echo #include ^<stdlib.h^> > $@
|
|
|
|
@echo #include "webp_dll.h" >> $@
|
|
|
|
@echo // This function should be used in place of free() for memory >> $@
|
|
|
|
@echo // returned by the WebP API. >> $@
|
|
|
|
@echo WEBP_EXTERN(void) WebPFree(void* ptr) { >> $@
|
|
|
|
@echo free(ptr); >> $@
|
|
|
|
@echo } >> $@
|
|
|
|
|
2011-02-19 08:33:46 +01:00
|
|
|
.SUFFIXES: .c .obj .res .exe
|
2014-05-24 05:13:01 +02:00
|
|
|
# File-specific flag builds. Note batch rules take precedence over wildcards,
|
|
|
|
# so for now name each file individually.
|
|
|
|
$(DIROBJ)\dsp\enc_avx2.obj: src\dsp\enc_avx2.c
|
|
|
|
$(CC) $(CFLAGS) $(AVX2_FLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dsp\ \
|
|
|
|
src\dsp\$(@B).c
|
2015-01-10 05:26:46 +01:00
|
|
|
$(DIROBJ)\examples\gif2webp.obj: examples\gif2webp.c
|
|
|
|
$(CC) $(CFLAGS) /DWEBP_HAVE_GIF /Fd$(LIBWEBP_PDBNAME) \
|
|
|
|
/Fo$(DIROBJ)\examples\ examples\$(@B).c
|
2014-05-24 05:13:01 +02:00
|
|
|
# Batch rules
|
2012-02-22 02:06:44 +01:00
|
|
|
{examples}.c{$(DIROBJ)\examples}.obj::
|
2014-05-24 05:13:01 +02:00
|
|
|
$(CC) $(CFLAGS) /Fd$(DIROBJ)\examples\ /Fo$(DIROBJ)\examples\ $<
|
2012-02-22 02:06:44 +01:00
|
|
|
{src\dec}.c{$(DIROBJ)\dec}.obj::
|
2012-04-21 01:20:32 +02:00
|
|
|
$(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dec\ $<
|
2012-11-19 20:21:37 +01:00
|
|
|
{src\demux}.c{$(DIROBJ)\demux}.obj::
|
|
|
|
$(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\demux\ $<
|
2012-02-22 02:06:44 +01:00
|
|
|
{src\dsp}.c{$(DIROBJ)\dsp}.obj::
|
2012-04-21 01:20:32 +02:00
|
|
|
$(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\dsp\ $<
|
2012-02-22 02:06:44 +01:00
|
|
|
{src\enc}.c{$(DIROBJ)\enc}.obj::
|
2012-04-21 01:20:32 +02:00
|
|
|
$(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\enc\ $<
|
2012-02-22 02:06:44 +01:00
|
|
|
{src\mux}.c{$(DIROBJ)\mux}.obj::
|
2012-04-21 01:20:32 +02:00
|
|
|
$(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\mux\ $<
|
2012-02-22 02:06:44 +01:00
|
|
|
{src\utils}.c{$(DIROBJ)\utils}.obj::
|
2012-04-21 01:20:32 +02:00
|
|
|
$(CC) $(CFLAGS) /Fd$(LIBWEBP_PDBNAME) /Fo$(DIROBJ)\utils\ $<
|
2011-02-19 08:33:46 +01:00
|
|
|
|
|
|
|
{$(DIROBJ)\examples}.obj{$(DIRBIN)}.exe:
|
2012-04-21 01:20:32 +02:00
|
|
|
$(LNKEXE) $(LDFLAGS) /OUT:$@ $** \
|
|
|
|
ole32.lib windowscodecs.lib shlwapi.lib
|
2011-02-19 08:33:46 +01:00
|
|
|
$(MT) -manifest $@.manifest -outputresource:$@;1
|
|
|
|
del $@.manifest
|
|
|
|
|
2011-07-23 03:40:35 +02:00
|
|
|
clean::
|
2011-06-02 00:55:22 +02:00
|
|
|
@-erase /s $(DIROBJ)\*.dll 2> NUL
|
|
|
|
@-erase /s $(DIROBJ)\*.exp 2> NUL
|
|
|
|
@-erase /s $(DIROBJ)\*.idb 2> NUL
|
|
|
|
@-erase /s $(DIROBJ)\*.lib 2> NUL
|
|
|
|
@-erase /s $(DIROBJ)\*.obj 2> NUL
|
|
|
|
@-erase /s $(DIROBJ)\*.pch 2> NUL
|
|
|
|
@-erase /s $(DIROBJ)\*.pdb 2> NUL
|
|
|
|
@-erase /s $(DIROBJ)\*.res 2> NUL
|
|
|
|
|
2011-02-19 08:33:46 +01:00
|
|
|
!ENDIF # End of case where a config was provided.
|