2011-02-20 20:11:55 +01:00
|
|
|
# This makefile is a simpler alternative to the autoconf-based build
|
|
|
|
# system, for simple local building of the libraries and tools.
|
|
|
|
# It will not install the libraries system-wide, but just create the 'cwebp'
|
|
|
|
# and 'dwebp' tools in the examples/ directory, along with the static
|
2015-04-15 11:14:08 +02:00
|
|
|
# libraries 'src/libwebp.a', 'src/libwebpdecoder.a', 'src/mux/libwebpmux.a',
|
|
|
|
# 'src/demux/libwebpdemux.a' and 'src/libwebpextras.a'.
|
2011-02-20 20:11:55 +01:00
|
|
|
#
|
|
|
|
# To build the library and examples, use:
|
|
|
|
# make -f makefile.unix
|
|
|
|
# from this top directory.
|
|
|
|
|
|
|
|
#### Customizable part ####
|
|
|
|
|
2012-11-21 21:12:29 +01:00
|
|
|
# These flags assume you have libpng, libjpeg, libtiff and libgif installed. If
|
|
|
|
# not, either follow the install instructions below or just comment out the next
|
|
|
|
# four lines.
|
2012-07-02 02:55:21 +02:00
|
|
|
EXTRA_FLAGS= -DWEBP_HAVE_PNG -DWEBP_HAVE_JPEG -DWEBP_HAVE_TIFF
|
2012-11-21 21:12:29 +01:00
|
|
|
DWEBP_LIBS= -lpng -lz
|
|
|
|
CWEBP_LIBS= $(DWEBP_LIBS) -ljpeg -ltiff
|
|
|
|
GIF_LIBS = -lgif
|
|
|
|
|
2011-06-24 22:47:59 +02:00
|
|
|
ifeq ($(strip $(shell uname)), Darwin)
|
2012-06-27 03:09:55 +02:00
|
|
|
# Work around a problem linking tables marked as common symbols,
|
|
|
|
# cf., src/enc/yuv.[hc]
|
|
|
|
# Failure observed with: gcc 4.2.1 and 4.0.1.
|
|
|
|
EXTRA_FLAGS += -fno-common
|
2013-05-01 23:47:56 +02:00
|
|
|
EXTRA_FLAGS += -DHAVE_GLUT_GLUT_H
|
2011-03-17 22:45:23 +01:00
|
|
|
EXTRA_FLAGS += -I/opt/local/include
|
|
|
|
EXTRA_LIBS += -L/opt/local/lib
|
2012-05-09 21:42:36 +02:00
|
|
|
GL_LIBS = -framework GLUT -framework OpenGL
|
|
|
|
else
|
|
|
|
GL_LIBS = -lglut -lGL
|
2011-03-17 22:45:23 +01:00
|
|
|
endif
|
2012-11-06 02:35:36 +01:00
|
|
|
|
2011-03-17 22:45:23 +01:00
|
|
|
|
|
|
|
# To install libraries on Mac OS X:
|
|
|
|
# 1. Install MacPorts (http://www.macports.org/install.php)
|
|
|
|
# 2. Run "sudo port install jpeg"
|
|
|
|
# 3. Run "sudo port install libpng"
|
2012-07-02 02:55:21 +02:00
|
|
|
# 4. Run "sudo port install tiff"
|
2012-11-06 02:35:36 +01:00
|
|
|
# 5. Run "sudo port install giflib"
|
2011-03-17 22:45:23 +01:00
|
|
|
|
|
|
|
# To install libraries on Linux:
|
|
|
|
# 1. Run "sudo apt-get install libjpeg62-dev"
|
|
|
|
# 2. Run "sudo apt-get install libpng12-dev"
|
2012-07-02 02:55:21 +02:00
|
|
|
# 3. Run "sudo apt-get install libtiff4-dev"
|
2012-11-06 02:35:36 +01:00
|
|
|
# 4. Run "sudo apt-get install libgif-dev"
|
2011-02-20 20:11:55 +01:00
|
|
|
|
|
|
|
# Uncomment for build for 32bit platform
|
|
|
|
# Alternatively, you can just use the command
|
|
|
|
# 'make -f makefile.unix EXTRA_FLAGS=-m32' to that effect.
|
2011-03-25 23:04:11 +01:00
|
|
|
# EXTRA_FLAGS += -m32
|
|
|
|
|
2011-05-03 02:19:00 +02:00
|
|
|
# Extra flags to enable experimental features and code
|
2011-05-09 21:10:28 +02:00
|
|
|
# EXTRA_FLAGS += -DWEBP_EXPERIMENTAL_FEATURES
|
2011-05-03 02:19:00 +02:00
|
|
|
|
2013-01-19 01:23:09 +01:00
|
|
|
# Extra flags to enable byte swap for 16 bit colorspaces.
|
|
|
|
# EXTRA_FLAGS += -DWEBP_SWAP_16BIT_CSP
|
|
|
|
|
2011-07-22 22:09:10 +02:00
|
|
|
# Extra flags to enable multi-threading
|
|
|
|
EXTRA_FLAGS += -DWEBP_USE_THREAD
|
|
|
|
EXTRA_LIBS += -lpthread
|
|
|
|
|
2011-03-25 23:04:11 +01:00
|
|
|
# Extra flags to emulate C89 strictness with the full ANSI
|
2015-11-06 07:47:03 +01:00
|
|
|
EXTRA_FLAGS += -Wextra -Wold-style-definition
|
|
|
|
EXTRA_FLAGS += -Wmissing-prototypes
|
|
|
|
EXTRA_FLAGS += -Wmissing-declarations
|
|
|
|
EXTRA_FLAGS += -Wdeclaration-after-statement
|
|
|
|
EXTRA_FLAGS += -Wshadow
|
|
|
|
EXTRA_FLAGS += -Wformat-security -Wformat-nonliteral
|
|
|
|
# EXTRA_FLAGS += -Wvla
|
2011-02-20 20:11:55 +01:00
|
|
|
|
2015-03-20 15:54:33 +01:00
|
|
|
# SSE4.1-specific flags:
|
|
|
|
ifeq ($(HAVE_SSE41), 1)
|
|
|
|
EXTRA_FLAGS += -DWEBP_HAVE_SSE41
|
|
|
|
src/dsp/%_sse41.o: EXTRA_FLAGS += -msse4.1
|
|
|
|
endif
|
|
|
|
|
2014-05-23 03:36:28 +02:00
|
|
|
# AVX2-specific flags:
|
|
|
|
ifeq ($(HAVE_AVX2), 1)
|
2014-06-08 04:57:51 +02:00
|
|
|
EXTRA_FLAGS += -DWEBP_HAVE_AVX2
|
2014-05-23 03:36:28 +02:00
|
|
|
src/dsp/%_avx2.o: EXTRA_FLAGS += -mavx2
|
|
|
|
endif
|
|
|
|
|
2014-03-31 16:36:33 +02:00
|
|
|
# NEON-specific flags:
|
|
|
|
# EXTRA_FLAGS += -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8
|
|
|
|
# -> seems to make the overall lib slower: -fno-split-wide-types
|
|
|
|
|
2011-02-20 20:11:55 +01:00
|
|
|
#### Nothing should normally be changed below this line ####
|
|
|
|
|
2011-08-26 02:25:11 +02:00
|
|
|
AR = ar
|
|
|
|
ARFLAGS = r
|
2012-05-15 22:48:11 +02:00
|
|
|
CPPFLAGS = -Isrc/ -Wall
|
2015-11-06 07:47:03 +01:00
|
|
|
CFLAGS = -O3 -DNDEBUG $(EXTRA_FLAGS)
|
2015-05-02 01:11:49 +02:00
|
|
|
CC = gcc
|
2011-08-26 03:33:28 +02:00
|
|
|
INSTALL = install
|
2011-11-30 13:16:45 +01:00
|
|
|
GROFF = /usr/bin/groff
|
|
|
|
COL = /usr/bin/col
|
2013-02-14 07:21:41 +01:00
|
|
|
LDFLAGS = $(EXTRA_LIBS) $(EXTRA_FLAGS) -lm
|
2011-02-20 20:11:55 +01:00
|
|
|
|
2015-05-02 01:11:49 +02:00
|
|
|
ANIM_UTIL_OBJS = \
|
|
|
|
examples/anim_util.o \
|
|
|
|
|
2012-04-12 21:00:43 +02:00
|
|
|
DEC_OBJS = \
|
|
|
|
src/dec/alpha.o \
|
|
|
|
src/dec/buffer.o \
|
|
|
|
src/dec/frame.o \
|
|
|
|
src/dec/idec.o \
|
|
|
|
src/dec/io.o \
|
|
|
|
src/dec/quant.o \
|
|
|
|
src/dec/tree.o \
|
|
|
|
src/dec/vp8.o \
|
|
|
|
src/dec/vp8l.o \
|
|
|
|
src/dec/webp.o \
|
|
|
|
|
2012-11-19 20:21:37 +01:00
|
|
|
DEMUX_OBJS = \
|
2015-09-03 01:20:24 +02:00
|
|
|
src/demux/anim_decode.o \
|
2012-11-19 20:21:37 +01:00
|
|
|
src/demux/demux.o \
|
|
|
|
|
2013-02-14 07:21:41 +01:00
|
|
|
DSP_DEC_OBJS = \
|
2014-05-26 18:05:03 +02:00
|
|
|
src/dsp/alpha_processing.o \
|
2014-08-21 19:26:18 +02:00
|
|
|
src/dsp/alpha_processing_mips_dsp_r2.o \
|
2014-08-26 05:55:28 +02:00
|
|
|
src/dsp/alpha_processing_sse2.o \
|
2015-06-19 14:23:38 +02:00
|
|
|
src/dsp/alpha_processing_sse41.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/cpu.o \
|
|
|
|
src/dsp/dec.o \
|
2014-02-14 04:32:21 +01:00
|
|
|
src/dsp/dec_clip_tables.o \
|
2013-12-25 12:16:01 +01:00
|
|
|
src/dsp/dec_mips32.o \
|
2014-09-02 14:03:13 +02:00
|
|
|
src/dsp/dec_mips_dsp_r2.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/dec_neon.o \
|
|
|
|
src/dsp/dec_sse2.o \
|
2015-03-19 21:18:59 +01:00
|
|
|
src/dsp/dec_sse41.o \
|
2015-01-28 08:02:41 +01:00
|
|
|
src/dsp/filters.o \
|
2014-08-04 16:22:10 +02:00
|
|
|
src/dsp/filters_mips_dsp_r2.o \
|
2015-01-29 08:06:29 +01:00
|
|
|
src/dsp/filters_sse2.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/lossless.o \
|
2014-09-02 16:34:52 +02:00
|
|
|
src/dsp/lossless_mips_dsp_r2.o \
|
2014-03-31 16:36:33 +02:00
|
|
|
src/dsp/lossless_neon.o \
|
2014-03-27 21:43:21 +01:00
|
|
|
src/dsp/lossless_sse2.o \
|
2015-01-09 12:05:53 +01:00
|
|
|
src/dsp/rescaler.o \
|
|
|
|
src/dsp/rescaler_mips32.o \
|
|
|
|
src/dsp/rescaler_mips_dsp_r2.o \
|
2015-10-05 11:26:52 +02:00
|
|
|
src/dsp/rescaler_neon.o \
|
2015-09-25 14:34:02 +02:00
|
|
|
src/dsp/rescaler_sse2.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/upsampling.o \
|
2014-08-15 11:00:32 +02:00
|
|
|
src/dsp/upsampling_mips_dsp_r2.o \
|
2013-01-18 03:06:26 +01:00
|
|
|
src/dsp/upsampling_neon.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/upsampling_sse2.o \
|
|
|
|
src/dsp/yuv.o \
|
2014-06-07 21:35:47 +02:00
|
|
|
src/dsp/yuv_mips32.o \
|
2014-08-12 11:47:36 +02:00
|
|
|
src/dsp/yuv_mips_dsp_r2.o \
|
2014-06-06 08:49:59 +02:00
|
|
|
src/dsp/yuv_sse2.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
|
2013-02-14 07:21:41 +01:00
|
|
|
DSP_ENC_OBJS = \
|
2015-01-07 09:11:57 +01:00
|
|
|
src/dsp/argb.o \
|
|
|
|
src/dsp/argb_mips_dsp_r2.o \
|
|
|
|
src/dsp/argb_sse2.o \
|
2015-02-07 11:13:26 +01:00
|
|
|
src/dsp/cost.o \
|
|
|
|
src/dsp/cost_mips32.o \
|
|
|
|
src/dsp/cost_mips_dsp_r2.o \
|
2015-02-18 09:40:30 +01:00
|
|
|
src/dsp/cost_sse2.o \
|
2013-02-14 07:21:41 +01:00
|
|
|
src/dsp/enc.o \
|
2014-05-22 09:26:18 +02:00
|
|
|
src/dsp/enc_avx2.o \
|
2014-02-19 15:33:50 +01:00
|
|
|
src/dsp/enc_mips32.o \
|
2014-10-10 12:31:00 +02:00
|
|
|
src/dsp/enc_mips_dsp_r2.o \
|
2013-02-14 07:21:41 +01:00
|
|
|
src/dsp/enc_neon.o \
|
|
|
|
src/dsp/enc_sse2.o \
|
2015-03-25 12:12:44 +01:00
|
|
|
src/dsp/enc_sse41.o \
|
2015-03-21 03:09:49 +01:00
|
|
|
src/dsp/lossless_enc.o \
|
|
|
|
src/dsp/lossless_enc_mips32.o \
|
|
|
|
src/dsp/lossless_enc_mips_dsp_r2.o \
|
|
|
|
src/dsp/lossless_enc_neon.o \
|
|
|
|
src/dsp/lossless_enc_sse2.o \
|
2015-06-23 08:46:57 +02:00
|
|
|
src/dsp/lossless_enc_sse41.o \
|
2013-02-14 07:21:41 +01:00
|
|
|
|
2012-04-12 21:00:43 +02:00
|
|
|
ENC_OBJS = \
|
|
|
|
src/enc/alpha.o \
|
|
|
|
src/enc/analysis.o \
|
2012-05-08 03:28:29 +02:00
|
|
|
src/enc/backward_references.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/config.o \
|
|
|
|
src/enc/cost.o \
|
2015-09-11 14:29:07 +02:00
|
|
|
src/enc/delta_palettization.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/filter.o \
|
|
|
|
src/enc/frame.o \
|
2012-05-08 03:28:29 +02:00
|
|
|
src/enc/histogram.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/iterator.o \
|
2014-08-05 19:14:57 +02:00
|
|
|
src/enc/near_lossless.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/picture.o \
|
2014-07-14 11:04:14 +02:00
|
|
|
src/enc/picture_csp.o \
|
2014-07-12 18:13:33 +02:00
|
|
|
src/enc/picture_psnr.o \
|
|
|
|
src/enc/picture_rescale.o \
|
|
|
|
src/enc/picture_tools.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/quant.o \
|
|
|
|
src/enc/syntax.o \
|
2012-12-03 13:50:14 +01:00
|
|
|
src/enc/token.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/tree.o \
|
2012-05-08 03:28:29 +02:00
|
|
|
src/enc/vp8l.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/webpenc.o \
|
|
|
|
|
2012-12-06 22:06:37 +01:00
|
|
|
EX_FORMAT_DEC_OBJS = \
|
2012-12-06 22:48:21 +01:00
|
|
|
examples/jpegdec.o \
|
2012-12-11 22:55:31 +01:00
|
|
|
examples/metadata.o \
|
2012-12-06 22:06:37 +01:00
|
|
|
examples/pngdec.o \
|
2012-12-06 23:04:36 +01:00
|
|
|
examples/tiffdec.o \
|
2014-04-23 04:30:27 +02:00
|
|
|
examples/webpdec.o \
|
2012-12-06 22:06:37 +01:00
|
|
|
|
2012-05-12 01:00:57 +02:00
|
|
|
EX_UTIL_OBJS = \
|
|
|
|
examples/example_util.o \
|
|
|
|
|
2015-01-14 00:43:31 +01:00
|
|
|
GIFDEC_OBJS = \
|
|
|
|
examples/gifdec.o \
|
|
|
|
|
2012-04-12 21:00:43 +02:00
|
|
|
MUX_OBJS = \
|
2015-01-07 01:12:48 +01:00
|
|
|
src/mux/anim_encode.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/mux/muxedit.o \
|
|
|
|
src/mux/muxinternal.o \
|
|
|
|
src/mux/muxread.o \
|
|
|
|
|
2013-02-14 07:21:41 +01:00
|
|
|
UTILS_DEC_OBJS = \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/bit_reader.o \
|
|
|
|
src/utils/color_cache.o \
|
|
|
|
src/utils/filters.o \
|
|
|
|
src/utils/huffman.o \
|
2013-02-14 07:21:41 +01:00
|
|
|
src/utils/quant_levels_dec.o \
|
2013-10-30 10:00:33 +01:00
|
|
|
src/utils/random.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/rescaler.o \
|
|
|
|
src/utils/thread.o \
|
2012-08-01 01:56:39 +02:00
|
|
|
src/utils/utils.o \
|
2012-04-12 21:00:43 +02:00
|
|
|
|
2013-02-14 07:21:41 +01:00
|
|
|
UTILS_ENC_OBJS = \
|
|
|
|
src/utils/bit_writer.o \
|
|
|
|
src/utils/huffman_encode.o \
|
|
|
|
src/utils/quant_levels.o \
|
|
|
|
|
2015-04-15 11:14:08 +02:00
|
|
|
EXTRA_OBJS = \
|
|
|
|
src/extras/extras.o \
|
|
|
|
|
2013-02-14 07:21:41 +01:00
|
|
|
LIBWEBPDECODER_OBJS = $(DEC_OBJS) $(DSP_DEC_OBJS) $(UTILS_DEC_OBJS)
|
|
|
|
LIBWEBP_OBJS = $(LIBWEBPDECODER_OBJS) $(ENC_OBJS) $(DSP_ENC_OBJS) \
|
|
|
|
$(UTILS_ENC_OBJS)
|
2012-04-12 21:00:43 +02:00
|
|
|
LIBWEBPMUX_OBJS = $(MUX_OBJS)
|
2012-11-19 20:21:37 +01:00
|
|
|
LIBWEBPDEMUX_OBJS = $(DEMUX_OBJS)
|
2015-04-15 11:14:08 +02:00
|
|
|
LIBWEBPEXTRA_OBJS = $(EXTRA_OBJS)
|
2012-04-12 21:00:43 +02:00
|
|
|
|
2012-07-17 00:45:30 +02:00
|
|
|
HDRS_INSTALLED = \
|
|
|
|
src/webp/decode.h \
|
2013-03-18 01:14:40 +01:00
|
|
|
src/webp/demux.h \
|
2012-07-17 00:45:30 +02:00
|
|
|
src/webp/encode.h \
|
2013-03-18 01:14:40 +01:00
|
|
|
src/webp/mux.h \
|
2013-03-19 22:47:00 +01:00
|
|
|
src/webp/mux_types.h \
|
2012-07-17 00:45:30 +02:00
|
|
|
src/webp/types.h \
|
|
|
|
|
2012-04-12 21:00:43 +02:00
|
|
|
HDRS = \
|
2013-06-12 01:04:54 +02:00
|
|
|
src/dec/alphai.h \
|
2015-03-30 10:07:36 +02:00
|
|
|
src/dec/common.h \
|
2012-07-17 07:12:59 +02:00
|
|
|
src/dec/decode_vp8.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dec/vp8i.h \
|
|
|
|
src/dec/vp8li.h \
|
2012-04-20 01:13:26 +02:00
|
|
|
src/dec/webpi.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/dsp.h \
|
|
|
|
src/dsp/lossless.h \
|
2014-10-10 12:31:00 +02:00
|
|
|
src/dsp/mips_macro.h \
|
2014-04-26 21:11:00 +02:00
|
|
|
src/dsp/neon.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/dsp/yuv.h \
|
2014-05-22 09:49:42 +02:00
|
|
|
src/dsp/yuv_tables_sse2.h \
|
2014-04-26 21:11:00 +02:00
|
|
|
src/enc/backward_references.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/cost.h \
|
2015-09-11 14:29:07 +02:00
|
|
|
src/enc/delta_palettization.h \
|
2014-04-26 21:11:00 +02:00
|
|
|
src/enc/histogram.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/enc/vp8enci.h \
|
2014-04-26 21:11:00 +02:00
|
|
|
src/enc/vp8li.h \
|
|
|
|
src/mux/muxi.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/bit_reader.h \
|
2015-04-07 01:05:21 +02:00
|
|
|
src/utils/bit_reader_inl.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/bit_writer.h \
|
|
|
|
src/utils/color_cache.h \
|
2015-04-07 01:05:21 +02:00
|
|
|
src/utils/endian_inl.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/filters.h \
|
|
|
|
src/utils/huffman.h \
|
2012-06-13 08:44:09 +02:00
|
|
|
src/utils/huffman_encode.h \
|
2012-05-21 15:22:06 +02:00
|
|
|
src/utils/quant_levels.h \
|
2013-02-14 07:21:41 +01:00
|
|
|
src/utils/quant_levels_dec.h \
|
2013-10-30 10:00:33 +01:00
|
|
|
src/utils/random.h \
|
2012-04-20 01:13:26 +02:00
|
|
|
src/utils/rescaler.h \
|
2012-04-12 21:00:43 +02:00
|
|
|
src/utils/thread.h \
|
2014-04-26 21:11:00 +02:00
|
|
|
src/utils/utils.h \
|
2012-05-24 11:21:37 +02:00
|
|
|
src/webp/format_constants.h \
|
2012-07-17 00:45:30 +02:00
|
|
|
$(HDRS_INSTALLED) \
|
2011-09-07 11:26:35 +02:00
|
|
|
|
2013-02-14 07:21:41 +01:00
|
|
|
OUT_LIBS = examples/libexample_util.a src/libwebpdecoder.a src/libwebp.a
|
2015-04-15 11:14:08 +02:00
|
|
|
EXTRA_LIB = src/libwebpextras.a
|
2012-04-24 03:46:12 +02:00
|
|
|
OUT_EXAMPLES = examples/cwebp examples/dwebp
|
2015-11-06 07:47:03 +01:00
|
|
|
EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \
|
|
|
|
examples/anim_diff
|
2011-11-30 13:16:45 +01:00
|
|
|
|
2012-04-24 03:46:12 +02:00
|
|
|
OUTPUT = $(OUT_LIBS) $(OUT_EXAMPLES)
|
|
|
|
ifeq ($(MAKECMDGOALS),clean)
|
2015-11-06 07:47:03 +01:00
|
|
|
OUTPUT += $(EXTRA_EXAMPLES)
|
2015-05-02 20:13:03 +02:00
|
|
|
OUTPUT += src/demux/libwebpdemux.a src/mux/libwebpmux.a $(EXTRA_LIB)
|
2015-05-02 01:11:49 +02:00
|
|
|
OUTPUT += examples/libgifdec.a examples/libanim_util.a
|
2012-04-24 03:46:12 +02:00
|
|
|
endif
|
2011-02-20 20:11:55 +01:00
|
|
|
|
2013-03-18 01:14:40 +01:00
|
|
|
ex: $(OUT_EXAMPLES)
|
2015-11-06 07:47:03 +01:00
|
|
|
all: ex $(EXTRA_EXAMPLES)
|
2015-04-15 11:14:08 +02:00
|
|
|
extras: $(EXTRA_LIB)
|
2011-02-20 20:11:55 +01:00
|
|
|
|
2012-12-06 22:06:37 +01:00
|
|
|
$(EX_FORMAT_DEC_OBJS): %.o: %.h
|
|
|
|
|
2014-07-03 19:41:37 +02:00
|
|
|
# special dependencies:
|
|
|
|
# tree.c/vp8.c/bit_reader.c <-> bit_reader_inl.h, endian_inl.h
|
|
|
|
# bit_writer.c <-> endian_inl.h
|
|
|
|
src/dec/tree.o: src/utils/bit_reader_inl.h src/utils/endian_inl.h
|
|
|
|
src/dec/vp8.o: src/utils/bit_reader_inl.h src/utils/endian_inl.h
|
|
|
|
src/utils/bit_reader.o: src/utils/bit_reader_inl.h src/utils/endian_inl.h
|
|
|
|
src/utils/bit_writer.o: src/utils/endian_inl.h
|
2014-06-02 08:19:34 +02:00
|
|
|
|
2011-08-26 02:25:11 +02:00
|
|
|
%.o: %.c $(HDRS)
|
2012-01-25 02:54:49 +01:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
2011-02-20 20:11:55 +01:00
|
|
|
|
2015-05-02 01:11:49 +02:00
|
|
|
examples/libanim_util.a: $(ANIM_UTIL_OBJS)
|
2012-05-12 01:00:57 +02:00
|
|
|
examples/libexample_util.a: $(EX_UTIL_OBJS)
|
2015-01-14 00:43:31 +01:00
|
|
|
examples/libgifdec.a: $(GIFDEC_OBJS)
|
2013-02-14 07:21:41 +01:00
|
|
|
src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS)
|
2012-04-12 21:00:43 +02:00
|
|
|
src/libwebp.a: $(LIBWEBP_OBJS)
|
|
|
|
src/mux/libwebpmux.a: $(LIBWEBPMUX_OBJS)
|
2012-11-19 20:21:37 +01:00
|
|
|
src/demux/libwebpdemux.a: $(LIBWEBPDEMUX_OBJS)
|
2015-04-15 11:14:08 +02:00
|
|
|
src/libwebpextras.a: $(LIBWEBPEXTRA_OBJS)
|
2012-05-12 01:00:57 +02:00
|
|
|
|
|
|
|
%.a:
|
2011-09-22 12:55:23 +02:00
|
|
|
$(AR) $(ARFLAGS) $@ $^
|
|
|
|
|
2015-05-02 01:11:49 +02:00
|
|
|
examples/anim_diff: examples/anim_diff.o $(ANIM_UTIL_OBJS) $(GIFDEC_OBJS)
|
2012-12-06 22:06:37 +01:00
|
|
|
examples/cwebp: examples/cwebp.o $(EX_FORMAT_DEC_OBJS)
|
2012-05-12 01:00:57 +02:00
|
|
|
examples/dwebp: examples/dwebp.o
|
2015-01-14 00:43:31 +01:00
|
|
|
examples/gif2webp: examples/gif2webp.o $(GIFDEC_OBJS)
|
2012-05-12 01:00:57 +02:00
|
|
|
examples/vwebp: examples/vwebp.o
|
|
|
|
examples/webpmux: examples/webpmux.o
|
|
|
|
|
2015-05-02 01:11:49 +02:00
|
|
|
examples/anim_diff: examples/libanim_util.a examples/libgifdec.a
|
2015-11-06 07:47:03 +01:00
|
|
|
examples/anim_diff: src/demux/libwebpdemux.a examples/libexample_util.a
|
|
|
|
examples/anim_diff: src/libwebp.a
|
2015-05-02 01:11:49 +02:00
|
|
|
examples/anim_diff: EXTRA_LIBS += $(GIF_LIBS)
|
|
|
|
examples/anim_diff: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
2014-04-23 04:30:27 +02:00
|
|
|
examples/cwebp: examples/libexample_util.a src/libwebp.a
|
2012-11-21 21:12:29 +01:00
|
|
|
examples/cwebp: EXTRA_LIBS += $(CWEBP_LIBS)
|
2013-02-14 07:21:41 +01:00
|
|
|
examples/dwebp: examples/libexample_util.a src/libwebpdecoder.a
|
2012-11-21 21:12:29 +01:00
|
|
|
examples/dwebp: EXTRA_LIBS += $(DWEBP_LIBS)
|
2015-01-14 00:43:31 +01:00
|
|
|
examples/gif2webp: examples/libexample_util.a examples/libgifdec.a
|
2013-09-12 22:41:09 +02:00
|
|
|
examples/gif2webp: src/mux/libwebpmux.a src/libwebp.a
|
2012-11-06 02:35:36 +01:00
|
|
|
examples/gif2webp: EXTRA_LIBS += $(GIF_LIBS)
|
2013-09-12 13:03:51 +02:00
|
|
|
examples/gif2webp: EXTRA_FLAGS += -DWEBP_HAVE_GIF
|
2012-11-19 20:21:37 +01:00
|
|
|
examples/vwebp: examples/libexample_util.a src/demux/libwebpdemux.a
|
|
|
|
examples/vwebp: src/libwebp.a
|
2012-05-09 21:42:36 +02:00
|
|
|
examples/vwebp: EXTRA_LIBS += $(GL_LIBS)
|
2013-09-12 13:03:51 +02:00
|
|
|
examples/vwebp: EXTRA_FLAGS += -DWEBP_HAVE_GL
|
2013-02-14 07:21:41 +01:00
|
|
|
examples/webpmux: examples/libexample_util.a src/mux/libwebpmux.a
|
|
|
|
examples/webpmux: src/libwebpdecoder.a
|
2011-11-30 13:16:45 +01:00
|
|
|
|
2013-03-18 01:14:40 +01:00
|
|
|
$(OUT_EXAMPLES) $(EXTRA_EXAMPLES):
|
2011-08-26 02:25:11 +02:00
|
|
|
$(CC) -o $@ $^ $(LDFLAGS)
|
2011-02-20 20:11:55 +01:00
|
|
|
|
2011-08-26 03:33:28 +02:00
|
|
|
dist: DESTDIR := dist
|
2013-03-18 01:14:40 +01:00
|
|
|
dist: OUT_EXAMPLES += $(EXTRA_EXAMPLES)
|
2011-08-26 03:33:28 +02:00
|
|
|
dist: all
|
2011-08-30 22:44:03 +02:00
|
|
|
$(INSTALL) -m755 -d $(DESTDIR)/include/webp \
|
2013-12-07 05:40:12 +01:00
|
|
|
$(DESTDIR)/bin $(DESTDIR)/doc $(DESTDIR)/lib
|
|
|
|
$(INSTALL) -m755 -s $(OUT_EXAMPLES) $(DESTDIR)/bin
|
2012-07-17 00:45:30 +02:00
|
|
|
$(INSTALL) -m644 $(HDRS_INSTALLED) $(DESTDIR)/include/webp
|
2011-08-26 03:33:28 +02:00
|
|
|
$(INSTALL) -m644 src/libwebp.a $(DESTDIR)/lib
|
2013-03-18 01:14:40 +01:00
|
|
|
$(INSTALL) -m644 src/demux/libwebpdemux.a $(DESTDIR)/lib
|
|
|
|
$(INSTALL) -m644 src/mux/libwebpmux.a $(DESTDIR)/lib
|
2011-08-30 22:44:03 +02:00
|
|
|
umask 022; \
|
2014-07-24 08:41:47 +02:00
|
|
|
for m in man/[cdv]webp.1 man/gif2webp.1 man/webpmux.1; do \
|
2011-08-30 22:44:03 +02:00
|
|
|
basenam=$$(basename $$m .1); \
|
2011-11-30 13:16:45 +01:00
|
|
|
$(GROFF) -t -e -man -T utf8 $$m \
|
|
|
|
| $(COL) -bx >$(DESTDIR)/doc/$${basenam}.txt; \
|
|
|
|
$(GROFF) -t -e -man -T html $$m \
|
|
|
|
| $(COL) -bx >$(DESTDIR)/doc/$${basenam}.html; \
|
2011-08-30 22:44:03 +02:00
|
|
|
done
|
2011-08-26 03:33:28 +02:00
|
|
|
|
2011-02-20 20:11:55 +01:00
|
|
|
clean:
|
2012-01-25 02:54:49 +01:00
|
|
|
$(RM) $(OUTPUT) *~ \
|
|
|
|
examples/*.o examples/*~ \
|
2011-02-20 20:11:55 +01:00
|
|
|
src/dec/*.o src/dec/*~ \
|
2012-11-19 20:21:37 +01:00
|
|
|
src/demux/*.o src/demux/*~ \
|
2011-09-02 23:30:08 +02:00
|
|
|
src/dsp/*.o src/dsp/*~ \
|
2012-01-25 02:54:49 +01:00
|
|
|
src/enc/*.o src/enc/*~ \
|
2015-05-02 20:13:03 +02:00
|
|
|
src/extras/*.o src/extras/*~ \
|
2011-09-22 12:55:23 +02:00
|
|
|
src/mux/*.o src/mux/*~ \
|
2012-01-25 02:54:49 +01:00
|
|
|
src/utils/*.o src/utils/*~ \
|
2012-01-06 07:38:05 +01:00
|
|
|
src/webp/*~ man/*~ doc/*~ swig/*~ \
|
2011-03-29 19:46:36 +02:00
|
|
|
|
2015-05-02 20:15:34 +02:00
|
|
|
.PHONY: all clean dist ex
|
2011-08-26 02:25:11 +02:00
|
|
|
.SUFFIXES:
|