| 1 |
# This makefile is a simpler alternative to the autoconf-based build |
| 2 |
# system, for simple local building of the libraries and tools. |
| 3 |
# It will not install the libraries system-wide, but just create the 'cwebp' |
| 4 |
# and 'dwebp' tools in the examples/ directory, along with the static |
| 5 |
# libraries 'src/libwebp.a', 'src/libwebpdecoder.a', 'src/mux/libwebpmux.a', |
| 6 |
# 'src/demux/libwebpdemux.a', 'extras/libwebpextras.a' and |
| 7 |
# 'sharpyuv/libsharpyuv.a'. |
| 8 |
# |
| 9 |
# To build the library and examples, use: |
| 10 |
# make -f makefile.unix |
| 11 |
# from this top directory. |
| 12 |
|
| 13 |
#### Customizable part #### |
| 14 |
|
| 15 |
# These flags assume you have libpng, libjpeg, libtiff and libgif installed. If |
| 16 |
# not, either follow the install instructions below or just comment out the next |
| 17 |
# four lines. |
| 18 |
EXTRA_FLAGS= -DWEBP_HAVE_PNG -DWEBP_HAVE_JPEG -DWEBP_HAVE_TIFF |
| 19 |
DWEBP_LIBS= -lpng -lz |
| 20 |
CWEBP_LIBS= $(DWEBP_LIBS) -ljpeg -ltiff |
| 21 |
GIF_LIBS = -lgif |
| 22 |
|
| 23 |
ifeq ($(strip $(shell uname)), Darwin) |
| 24 |
# Work around a problem linking tables marked as common symbols, |
| 25 |
# cf., src/enc/yuv.[hc] |
| 26 |
# Failure observed with: gcc 4.2.1 and 4.0.1. |
| 27 |
EXTRA_FLAGS += -fno-common |
| 28 |
EXTRA_FLAGS += -DHAVE_GLUT_GLUT_H |
| 29 |
EXTRA_FLAGS += -Wno-deprecated-declarations |
| 30 |
EXTRA_FLAGS += -I/opt/local/include |
| 31 |
EXTRA_LIBS += -L/opt/local/lib |
| 32 |
GL_LIBS = -framework GLUT -framework OpenGL |
| 33 |
else |
| 34 |
EXTRA_FLAGS += -I/usr/local/include |
| 35 |
EXTRA_LIBS += -L/usr/local/lib |
| 36 |
GL_LIBS = -lglut -lGL |
| 37 |
endif |
| 38 |
|
| 39 |
# SDL flags: use sdl-config if it exists |
| 40 |
SDL_CONFIG = $(shell sdl2-config --version 2> /dev/null) |
| 41 |
ifneq ($(SDL_CONFIG),) |
| 42 |
SDL_LIBS = $(shell sdl2-config --libs) |
| 43 |
SDL_FLAGS = $(shell sdl2-config --cflags) |
| 44 |
else |
| 45 |
# use best-guess |
| 46 |
SDL_LIBS = -lSDL2 |
| 47 |
SDL_FLAGS = |
| 48 |
endif |
| 49 |
|
| 50 |
# To install libraries on Mac OS X: |
| 51 |
# 1. Install MacPorts (https://www.macports.org/install.php) |
| 52 |
# 2. Run "sudo port install jpeg" |
| 53 |
# 3. Run "sudo port install libpng" |
| 54 |
# 4. Run "sudo port install tiff" |
| 55 |
# 5. Run "sudo port install giflib" |
| 56 |
|
| 57 |
# To install libraries on Linux: |
| 58 |
# 1. Run "sudo apt-get install libjpeg62-dev" |
| 59 |
# 2. Run "sudo apt-get install libpng12-dev" |
| 60 |
# 3. Run "sudo apt-get install libtiff4-dev" |
| 61 |
# 4. Run "sudo apt-get install libgif-dev" |
| 62 |
|
| 63 |
# Uncomment for build for 32bit platform |
| 64 |
# Alternatively, you can just use the command |
| 65 |
# 'make -f makefile.unix EXTRA_FLAGS=-m32' to that effect. |
| 66 |
# EXTRA_FLAGS += -m32 |
| 67 |
|
| 68 |
# Extra flags to enable byte swap for 16 bit colorspaces. |
| 69 |
# EXTRA_FLAGS += -DWEBP_SWAP_16BIT_CSP=1 |
| 70 |
|
| 71 |
# Extra flags to enable multi-threading |
| 72 |
EXTRA_FLAGS += -DWEBP_USE_THREAD |
| 73 |
EXTRA_LIBS += -lpthread |
| 74 |
|
| 75 |
# Control symbol visibility. Comment out if your compiler doesn't support it. |
| 76 |
EXTRA_FLAGS += -fvisibility=hidden |
| 77 |
|
| 78 |
# Extra flags to emulate C89 strictness with the full ANSI |
| 79 |
EXTRA_FLAGS += -Wextra -Wold-style-definition |
| 80 |
EXTRA_FLAGS += -Wmissing-prototypes |
| 81 |
EXTRA_FLAGS += -Wmissing-declarations |
| 82 |
EXTRA_FLAGS += -Wdeclaration-after-statement |
| 83 |
EXTRA_FLAGS += -Wshadow |
| 84 |
EXTRA_FLAGS += -Wformat-security -Wformat-nonliteral |
| 85 |
# EXTRA_FLAGS += -Wvla |
| 86 |
|
| 87 |
# SSE4.1-specific flags: |
| 88 |
ifeq ($(HAVE_SSE41), 1) |
| 89 |
EXTRA_FLAGS += -DWEBP_HAVE_SSE41 |
| 90 |
src/dsp/%_sse41.o: EXTRA_FLAGS += -msse4.1 |
| 91 |
endif |
| 92 |
|
| 93 |
# NEON-specific flags: |
| 94 |
# EXTRA_FLAGS += -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 |
| 95 |
# -> seems to make the overall lib slower: -fno-split-wide-types |
| 96 |
|
| 97 |
# MIPS (MSA) 32-bit build specific flags for mips32r5 (p5600): |
| 98 |
# EXTRA_FLAGS += -mips32r5 -mabi=32 -mtune=p5600 -mmsa -mfp64 |
| 99 |
# EXTRA_FLAGS += -msched-weight -mload-store-pairs |
| 100 |
|
| 101 |
# MIPS (MSA) 64-bit build specific flags for mips64r6 (i6400): |
| 102 |
# EXTRA_FLAGS += -mips64r6 -mabi=64 -mtune=i6400 -mmsa -mfp64 |
| 103 |
# EXTRA_FLAGS += -msched-weight -mload-store-pairs |
| 104 |
|
| 105 |
#### Nothing should normally be changed below this line #### |
| 106 |
|
| 107 |
AR = ar |
| 108 |
ARFLAGS = r |
| 109 |
CPPFLAGS = -I. -Isrc/ -Wall |
| 110 |
ifeq ($(DEBUG), 1) |
| 111 |
CFLAGS = -g |
| 112 |
else |
| 113 |
CFLAGS = -O3 -DNDEBUG |
| 114 |
endif |
| 115 |
CFLAGS += $(EXTRA_FLAGS) |
| 116 |
CC = gcc |
| 117 |
INSTALL = install |
| 118 |
GROFF = /usr/bin/groff |
| 119 |
COL = /usr/bin/col |
| 120 |
LDFLAGS = $(EXTRA_LIBS) $(EXTRA_FLAGS) -lm |
| 121 |
|
| 122 |
ifdef BITTRACE |
| 123 |
CFLAGS += -DBITTRACE=$(BITTRACE) |
| 124 |
endif |
| 125 |
|
| 126 |
ANIM_UTIL_OBJS = \ |
| 127 |
examples/anim_util.o \ |
| 128 |
|
| 129 |
SHARPYUV_OBJS = \ |
| 130 |
sharpyuv/sharpyuv.o \ |
| 131 |
sharpyuv/sharpyuv_cpu.o \ |
| 132 |
sharpyuv/sharpyuv_csp.o \ |
| 133 |
sharpyuv/sharpyuv_dsp.o \ |
| 134 |
sharpyuv/sharpyuv_gamma.o \ |
| 135 |
sharpyuv/sharpyuv_neon.o \ |
| 136 |
sharpyuv/sharpyuv_sse2.o \ |
| 137 |
|
| 138 |
DEC_OBJS = \ |
| 139 |
src/dec/alpha_dec.o \ |
| 140 |
src/dec/buffer_dec.o \ |
| 141 |
src/dec/frame_dec.o \ |
| 142 |
src/dec/idec_dec.o \ |
| 143 |
src/dec/io_dec.o \ |
| 144 |
src/dec/quant_dec.o \ |
| 145 |
src/dec/tree_dec.o \ |
| 146 |
src/dec/vp8_dec.o \ |
| 147 |
src/dec/vp8l_dec.o \ |
| 148 |
src/dec/webp_dec.o \ |
| 149 |
|
| 150 |
DEMUX_OBJS = \ |
| 151 |
src/demux/anim_decode.o \ |
| 152 |
src/demux/demux.o \ |
| 153 |
|
| 154 |
DSP_DEC_OBJS = \ |
| 155 |
src/dsp/alpha_processing.o \ |
| 156 |
src/dsp/alpha_processing_mips_dsp_r2.o \ |
| 157 |
src/dsp/alpha_processing_neon.o \ |
| 158 |
src/dsp/alpha_processing_sse2.o \ |
| 159 |
src/dsp/alpha_processing_sse41.o \ |
| 160 |
src/dsp/cpu.o \ |
| 161 |
src/dsp/dec.o \ |
| 162 |
src/dsp/dec_clip_tables.o \ |
| 163 |
src/dsp/dec_mips32.o \ |
| 164 |
src/dsp/dec_mips_dsp_r2.o \ |
| 165 |
src/dsp/dec_msa.o \ |
| 166 |
src/dsp/dec_neon.o \ |
| 167 |
src/dsp/dec_sse2.o \ |
| 168 |
src/dsp/dec_sse41.o \ |
| 169 |
src/dsp/filters.o \ |
| 170 |
src/dsp/filters_mips_dsp_r2.o \ |
| 171 |
src/dsp/filters_msa.o \ |
| 172 |
src/dsp/filters_neon.o \ |
| 173 |
src/dsp/filters_sse2.o \ |
| 174 |
src/dsp/lossless.o \ |
| 175 |
src/dsp/lossless_mips_dsp_r2.o \ |
| 176 |
src/dsp/lossless_msa.o \ |
| 177 |
src/dsp/lossless_neon.o \ |
| 178 |
src/dsp/lossless_sse2.o \ |
| 179 |
src/dsp/lossless_sse41.o \ |
| 180 |
src/dsp/rescaler.o \ |
| 181 |
src/dsp/rescaler_mips32.o \ |
| 182 |
src/dsp/rescaler_mips_dsp_r2.o \ |
| 183 |
src/dsp/rescaler_msa.o \ |
| 184 |
src/dsp/rescaler_neon.o \ |
| 185 |
src/dsp/rescaler_sse2.o \ |
| 186 |
src/dsp/upsampling.o \ |
| 187 |
src/dsp/upsampling_mips_dsp_r2.o \ |
| 188 |
src/dsp/upsampling_msa.o \ |
| 189 |
src/dsp/upsampling_neon.o \ |
| 190 |
src/dsp/upsampling_sse2.o \ |
| 191 |
src/dsp/upsampling_sse41.o \ |
| 192 |
src/dsp/yuv.o \ |
| 193 |
src/dsp/yuv_mips32.o \ |
| 194 |
src/dsp/yuv_mips_dsp_r2.o \ |
| 195 |
src/dsp/yuv_neon.o \ |
| 196 |
src/dsp/yuv_sse2.o \ |
| 197 |
src/dsp/yuv_sse41.o \ |
| 198 |
|
| 199 |
DSP_ENC_OBJS = \ |
| 200 |
src/dsp/cost.o \ |
| 201 |
src/dsp/cost_mips32.o \ |
| 202 |
src/dsp/cost_mips_dsp_r2.o \ |
| 203 |
src/dsp/cost_neon.o \ |
| 204 |
src/dsp/cost_sse2.o \ |
| 205 |
src/dsp/enc.o \ |
| 206 |
src/dsp/enc_mips32.o \ |
| 207 |
src/dsp/enc_mips_dsp_r2.o \ |
| 208 |
src/dsp/enc_msa.o \ |
| 209 |
src/dsp/enc_neon.o \ |
| 210 |
src/dsp/enc_sse2.o \ |
| 211 |
src/dsp/enc_sse41.o \ |
| 212 |
src/dsp/lossless_enc.o \ |
| 213 |
src/dsp/lossless_enc_mips32.o \ |
| 214 |
src/dsp/lossless_enc_mips_dsp_r2.o \ |
| 215 |
src/dsp/lossless_enc_msa.o \ |
| 216 |
src/dsp/lossless_enc_neon.o \ |
| 217 |
src/dsp/lossless_enc_sse2.o \ |
| 218 |
src/dsp/lossless_enc_sse41.o \ |
| 219 |
src/dsp/ssim.o \ |
| 220 |
src/dsp/ssim_sse2.o \ |
| 221 |
|
| 222 |
ENC_OBJS = \ |
| 223 |
src/enc/alpha_enc.o \ |
| 224 |
src/enc/analysis_enc.o \ |
| 225 |
src/enc/backward_references_cost_enc.o \ |
| 226 |
src/enc/backward_references_enc.o \ |
| 227 |
src/enc/config_enc.o \ |
| 228 |
src/enc/cost_enc.o \ |
| 229 |
src/enc/filter_enc.o \ |
| 230 |
src/enc/frame_enc.o \ |
| 231 |
src/enc/histogram_enc.o \ |
| 232 |
src/enc/iterator_enc.o \ |
| 233 |
src/enc/near_lossless_enc.o \ |
| 234 |
src/enc/picture_enc.o \ |
| 235 |
src/enc/picture_csp_enc.o \ |
| 236 |
src/enc/picture_psnr_enc.o \ |
| 237 |
src/enc/picture_rescale_enc.o \ |
| 238 |
src/enc/picture_tools_enc.o \ |
| 239 |
src/enc/predictor_enc.o \ |
| 240 |
src/enc/quant_enc.o \ |
| 241 |
src/enc/syntax_enc.o \ |
| 242 |
src/enc/token_enc.o \ |
| 243 |
src/enc/tree_enc.o \ |
| 244 |
src/enc/vp8l_enc.o \ |
| 245 |
src/enc/webp_enc.o \ |
| 246 |
|
| 247 |
EX_FORMAT_DEC_OBJS = \ |
| 248 |
imageio/image_dec.o \ |
| 249 |
imageio/jpegdec.o \ |
| 250 |
imageio/metadata.o \ |
| 251 |
imageio/pngdec.o \ |
| 252 |
imageio/pnmdec.o \ |
| 253 |
imageio/tiffdec.o \ |
| 254 |
imageio/webpdec.o \ |
| 255 |
|
| 256 |
EX_FORMAT_ENC_OBJS = \ |
| 257 |
imageio/image_enc.o \ |
| 258 |
|
| 259 |
EX_UTIL_OBJS = \ |
| 260 |
examples/example_util.o \ |
| 261 |
|
| 262 |
GIFDEC_OBJS = \ |
| 263 |
examples/gifdec.o \ |
| 264 |
|
| 265 |
IMAGE_UTIL_OBJS = \ |
| 266 |
imageio/imageio_util.o \ |
| 267 |
|
| 268 |
MUX_OBJS = \ |
| 269 |
src/mux/anim_encode.o \ |
| 270 |
src/mux/muxedit.o \ |
| 271 |
src/mux/muxinternal.o \ |
| 272 |
src/mux/muxread.o \ |
| 273 |
|
| 274 |
UTILS_DEC_OBJS = \ |
| 275 |
src/utils/bit_reader_utils.o \ |
| 276 |
src/utils/color_cache_utils.o \ |
| 277 |
src/utils/filters_utils.o \ |
| 278 |
src/utils/huffman_utils.o \ |
| 279 |
src/utils/palette.o \ |
| 280 |
src/utils/quant_levels_dec_utils.o \ |
| 281 |
src/utils/random_utils.o \ |
| 282 |
src/utils/rescaler_utils.o \ |
| 283 |
src/utils/thread_utils.o \ |
| 284 |
src/utils/utils.o \ |
| 285 |
|
| 286 |
UTILS_ENC_OBJS = \ |
| 287 |
src/utils/bit_writer_utils.o \ |
| 288 |
src/utils/huffman_encode_utils.o \ |
| 289 |
src/utils/quant_levels_utils.o \ |
| 290 |
|
| 291 |
EXTRA_OBJS = \ |
| 292 |
extras/extras.o \ |
| 293 |
extras/quality_estimate.o \ |
| 294 |
extras/sharpyuv_risk_table.o \ |
| 295 |
|
| 296 |
LIBWEBPDECODER_OBJS = $(DEC_OBJS) $(DSP_DEC_OBJS) $(UTILS_DEC_OBJS) |
| 297 |
LIBWEBP_OBJS = $(LIBWEBPDECODER_OBJS) $(ENC_OBJS) \ |
| 298 |
$(DSP_ENC_OBJS) $(UTILS_ENC_OBJS) |
| 299 |
LIBWEBPMUX_OBJS = $(MUX_OBJS) |
| 300 |
LIBWEBPDEMUX_OBJS = $(DEMUX_OBJS) |
| 301 |
LIBWEBPEXTRA_OBJS = $(EXTRA_OBJS) |
| 302 |
LIBSHARPYUV_OBJS = $(SHARPYUV_OBJS) |
| 303 |
|
| 304 |
HDRS_INSTALLED = \ |
| 305 |
src/webp/decode.h \ |
| 306 |
src/webp/demux.h \ |
| 307 |
src/webp/encode.h \ |
| 308 |
src/webp/mux.h \ |
| 309 |
src/webp/mux_types.h \ |
| 310 |
src/webp/types.h \ |
| 311 |
|
| 312 |
SHARPYUV_HDRS_INSTALLED = \ |
| 313 |
sharpyuv/sharpyuv.h \ |
| 314 |
sharpyuv/sharpyuv_cpu.h \ |
| 315 |
sharpyuv/sharpyuv_csp.h \ |
| 316 |
|
| 317 |
HDRS = \ |
| 318 |
src/dec/alphai_dec.h \ |
| 319 |
src/dec/common_dec.h \ |
| 320 |
src/dec/vp8_dec.h \ |
| 321 |
src/dec/vp8i_dec.h \ |
| 322 |
src/dec/vp8li_dec.h \ |
| 323 |
src/dec/webpi_dec.h \ |
| 324 |
src/dsp/common_sse2.h \ |
| 325 |
src/dsp/cpu.h \ |
| 326 |
src/dsp/dsp.h \ |
| 327 |
src/dsp/lossless.h \ |
| 328 |
src/dsp/lossless_common.h \ |
| 329 |
src/dsp/mips_macro.h \ |
| 330 |
src/dsp/msa_macro.h \ |
| 331 |
src/dsp/neon.h \ |
| 332 |
src/dsp/yuv.h \ |
| 333 |
src/enc/backward_references_enc.h \ |
| 334 |
src/enc/cost_enc.h \ |
| 335 |
src/enc/histogram_enc.h \ |
| 336 |
src/enc/vp8i_enc.h \ |
| 337 |
src/enc/vp8li_enc.h \ |
| 338 |
src/mux/animi.h \ |
| 339 |
src/mux/muxi.h \ |
| 340 |
src/utils/bit_reader_utils.h \ |
| 341 |
src/utils/bit_reader_inl_utils.h \ |
| 342 |
src/utils/bit_writer_utils.h \ |
| 343 |
src/utils/color_cache_utils.h \ |
| 344 |
src/utils/endian_inl_utils.h \ |
| 345 |
src/utils/filters_utils.h \ |
| 346 |
src/utils/huffman_utils.h \ |
| 347 |
src/utils/huffman_encode_utils.h \ |
| 348 |
src/utils/palette.h \ |
| 349 |
src/utils/quant_levels_utils.h \ |
| 350 |
src/utils/quant_levels_dec_utils.h \ |
| 351 |
src/utils/random_utils.h \ |
| 352 |
src/utils/rescaler_utils.h \ |
| 353 |
src/utils/thread_utils.h \ |
| 354 |
src/utils/utils.h \ |
| 355 |
src/webp/format_constants.h \ |
| 356 |
$(HDRS_INSTALLED) \ |
| 357 |
$(SHARPYUV_HDRS_INSTALLED) \ |
| 358 |
|
| 359 |
OUT_LIBS = examples/libexample_util.a |
| 360 |
OUT_LIBS += imageio/libimageio_util.a |
| 361 |
OUT_LIBS += imageio/libimagedec.a |
| 362 |
OUT_LIBS += imageio/libimageenc.a |
| 363 |
OUT_LIBS += src/libwebpdecoder.a |
| 364 |
OUT_LIBS += src/libwebp.a |
| 365 |
OUT_LIBS += sharpyuv/libsharpyuv.a |
| 366 |
EXTRA_LIB = extras/libwebpextras.a |
| 367 |
OUT_EXAMPLES = examples/cwebp examples/dwebp |
| 368 |
EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \ |
| 369 |
examples/anim_diff examples/anim_dump \ |
| 370 |
examples/img2webp examples/webpinfo |
| 371 |
OTHER_EXAMPLES = extras/get_disto extras/webp_quality extras/vwebp_sdl |
| 372 |
|
| 373 |
OUTPUT = $(OUT_LIBS) $(OUT_EXAMPLES) |
| 374 |
ifeq ($(MAKECMDGOALS),clean) |
| 375 |
OUTPUT += $(EXTRA_EXAMPLES) $(OTHER_EXAMPLES) |
| 376 |
OUTPUT += src/demux/libwebpdemux.a src/mux/libwebpmux.a $(EXTRA_LIB) |
| 377 |
OUTPUT += examples/libgifdec.a examples/libanim_util.a |
| 378 |
endif |
| 379 |
|
| 380 |
ex: $(OUT_EXAMPLES) |
| 381 |
all: ex $(EXTRA_EXAMPLES) $(OTHER_EXAMPLES) |
| 382 |
extras: $(EXTRA_LIB) |
| 383 |
|
| 384 |
$(EX_FORMAT_DEC_OBJS): %.o: %.h |
| 385 |
|
| 386 |
# special dependencies: |
| 387 |
# tree_dec.c/vp8_dec.c/bit_reader_utils.c <-> |
| 388 |
# bit_reader_inl_utils.h, endian_inl_utils.h |
| 389 |
# bit_writer_utils.c <-> endian_inl_utils.h |
| 390 |
src/dec/tree_dec.o: src/utils/bit_reader_inl_utils.h |
| 391 |
src/dec/tree_dec.o: src/utils/endian_inl_utils.h |
| 392 |
src/dec/vp8_dec.o: src/utils/bit_reader_inl_utils.h src/utils/endian_inl_utils.h |
| 393 |
src/utils/bit_reader_utils.o: src/utils/bit_reader_inl_utils.h |
| 394 |
src/utils/bit_reader_utils.o: src/utils/endian_inl_utils.h |
| 395 |
src/utils/bit_writer_utils.o: src/utils/endian_inl_utils.h |
| 396 |
|
| 397 |
%.o: %.c $(HDRS) |
| 398 |
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ |
| 399 |
|
| 400 |
examples/libanim_util.a: $(ANIM_UTIL_OBJS) |
| 401 |
examples/libexample_util.a: $(EX_UTIL_OBJS) |
| 402 |
examples/libgifdec.a: $(GIFDEC_OBJS) |
| 403 |
extras/libwebpextras.a: $(LIBWEBPEXTRA_OBJS) |
| 404 |
imageio/libimagedec.a: $(EX_FORMAT_DEC_OBJS) |
| 405 |
imageio/libimageenc.a: $(EX_FORMAT_ENC_OBJS) |
| 406 |
imageio/libimageio_util.a: $(IMAGE_UTIL_OBJS) |
| 407 |
src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS) |
| 408 |
src/libwebp.a: $(LIBWEBP_OBJS) |
| 409 |
src/mux/libwebpmux.a: $(LIBWEBPMUX_OBJS) |
| 410 |
src/demux/libwebpdemux.a: $(LIBWEBPDEMUX_OBJS) |
| 411 |
sharpyuv/libsharpyuv.a: $(LIBSHARPYUV_OBJS) |
| 412 |
|
| 413 |
%.a: |
| 414 |
$(AR) $(ARFLAGS) $@ $^ |
| 415 |
|
| 416 |
examples/anim_diff: examples/anim_diff.o $(ANIM_UTIL_OBJS) $(GIFDEC_OBJS) |
| 417 |
examples/anim_dump: examples/anim_dump.o $(ANIM_UTIL_OBJS) $(GIFDEC_OBJS) |
| 418 |
examples/cwebp: examples/cwebp.o |
| 419 |
examples/dwebp: examples/dwebp.o |
| 420 |
examples/gif2webp: examples/gif2webp.o $(GIFDEC_OBJS) |
| 421 |
examples/vwebp: examples/vwebp.o |
| 422 |
examples/webpmux: examples/webpmux.o |
| 423 |
examples/img2webp: examples/img2webp.o |
| 424 |
examples/webpinfo: examples/webpinfo.o |
| 425 |
|
| 426 |
examples/anim_diff: examples/libanim_util.a examples/libgifdec.a |
| 427 |
examples/anim_diff: src/demux/libwebpdemux.a examples/libexample_util.a |
| 428 |
examples/anim_diff: imageio/libimageio_util.a src/libwebp.a |
| 429 |
examples/anim_diff: sharpyuv/libsharpyuv.a |
| 430 |
examples/anim_diff: override EXTRA_LIBS += $(GIF_LIBS) |
| 431 |
examples/anim_diff: EXTRA_FLAGS += -DWEBP_HAVE_GIF |
| 432 |
examples/anim_dump: examples/libanim_util.a examples/libgifdec.a |
| 433 |
examples/anim_dump: src/demux/libwebpdemux.a |
| 434 |
examples/anim_dump: examples/libexample_util.a |
| 435 |
examples/anim_dump: imageio/libimageio_util.a |
| 436 |
examples/anim_dump: imageio/libimageenc.a |
| 437 |
examples/anim_dump: src/libwebp.a |
| 438 |
examples/anim_dump: sharpyuv/libsharpyuv.a |
| 439 |
examples/anim_dump: override EXTRA_LIBS += $(GIF_LIBS) $(DWEBP_LIBS) |
| 440 |
examples/cwebp: examples/libexample_util.a |
| 441 |
examples/cwebp: imageio/libimagedec.a |
| 442 |
examples/cwebp: src/demux/libwebpdemux.a |
| 443 |
examples/cwebp: imageio/libimageio_util.a |
| 444 |
examples/cwebp: src/libwebp.a |
| 445 |
examples/cwebp: sharpyuv/libsharpyuv.a |
| 446 |
examples/cwebp: override EXTRA_LIBS += $(CWEBP_LIBS) |
| 447 |
examples/dwebp: examples/libexample_util.a |
| 448 |
examples/dwebp: imageio/libimagedec.a |
| 449 |
examples/dwebp: src/demux/libwebpdemux.a |
| 450 |
examples/dwebp: imageio/libimageenc.a |
| 451 |
examples/dwebp: imageio/libimageio_util.a |
| 452 |
examples/dwebp: src/libwebp.a |
| 453 |
examples/dwebp: sharpyuv/libsharpyuv.a |
| 454 |
examples/dwebp: override EXTRA_LIBS += $(DWEBP_LIBS) |
| 455 |
examples/gif2webp: examples/libexample_util.a imageio/libimageio_util.a |
| 456 |
examples/gif2webp: examples/libgifdec.a src/mux/libwebpmux.a src/libwebp.a |
| 457 |
examples/gif2webp: sharpyuv/libsharpyuv.a |
| 458 |
examples/gif2webp: override EXTRA_LIBS += $(GIF_LIBS) |
| 459 |
examples/gif2webp: EXTRA_FLAGS += -DWEBP_HAVE_GIF |
| 460 |
examples/vwebp: examples/libexample_util.a src/demux/libwebpdemux.a |
| 461 |
examples/vwebp: imageio/libimageio_util.a src/libwebp.a |
| 462 |
examples/vwebp: sharpyuv/libsharpyuv.a |
| 463 |
examples/vwebp: override EXTRA_LIBS += $(GL_LIBS) |
| 464 |
examples/vwebp: EXTRA_FLAGS += -DWEBP_HAVE_GL |
| 465 |
examples/webpmux: examples/libexample_util.a imageio/libimageio_util.a |
| 466 |
examples/webpmux: src/mux/libwebpmux.a src/libwebpdecoder.a |
| 467 |
examples/img2webp: examples/libexample_util.a imageio/libimageio_util.a |
| 468 |
examples/img2webp: imageio/libimagedec.a |
| 469 |
examples/img2webp: src/demux/libwebpdemux.a |
| 470 |
examples/img2webp: src/mux/libwebpmux.a |
| 471 |
examples/img2webp: src/libwebp.a |
| 472 |
examples/img2webp: sharpyuv/libsharpyuv.a |
| 473 |
examples/img2webp: override EXTRA_LIBS += $(CWEBP_LIBS) |
| 474 |
examples/webpinfo: examples/libexample_util.a imageio/libimageio_util.a |
| 475 |
examples/webpinfo: src/libwebpdecoder.a |
| 476 |
|
| 477 |
extras/get_disto: extras/get_disto.o |
| 478 |
extras/get_disto: imageio/libimagedec.a |
| 479 |
extras/get_disto: src/demux/libwebpdemux.a |
| 480 |
extras/get_disto: imageio/libimageio_util.a |
| 481 |
extras/get_disto: src/libwebp.a |
| 482 |
extras/get_disto: sharpyuv/libsharpyuv.a |
| 483 |
extras/get_disto: override EXTRA_LIBS += $(CWEBP_LIBS) |
| 484 |
|
| 485 |
extras/webp_quality: extras/webp_quality.o |
| 486 |
extras/webp_quality: imageio/libimageio_util.a |
| 487 |
extras/webp_quality: $(EXTRA_LIB) src/libwebp.a |
| 488 |
extras/webp_quality: sharpyuv/libsharpyuv.a |
| 489 |
|
| 490 |
extras/vwebp_sdl: extras/vwebp_sdl.o |
| 491 |
extras/vwebp_sdl: extras/webp_to_sdl.o |
| 492 |
extras/vwebp_sdl: imageio/libimageio_util.a |
| 493 |
extras/vwebp_sdl: src/libwebp.a |
| 494 |
extras/vwebp_sdl: sharpyuv/libsharpyuv.a |
| 495 |
extras/vwebp_sdl: EXTRA_FLAGS += -DWEBP_HAVE_SDL $(SDL_FLAGS) |
| 496 |
extras/vwebp_sdl: override EXTRA_LIBS += $(SDL_LIBS) |
| 497 |
|
| 498 |
$(OUT_EXAMPLES) $(EXTRA_EXAMPLES) $(OTHER_EXAMPLES): |
| 499 |
$(CC) -o $@ $^ $(LDFLAGS) |
| 500 |
|
| 501 |
dist: DESTDIR := dist |
| 502 |
dist: OUT_EXAMPLES += $(EXTRA_EXAMPLES) |
| 503 |
dist: all |
| 504 |
$(INSTALL) -m755 -d $(DESTDIR)/include/webp \ |
| 505 |
$(DESTDIR)/include/webp/sharpyuv \ |
| 506 |
$(DESTDIR)/bin $(DESTDIR)/doc $(DESTDIR)/lib |
| 507 |
$(INSTALL) -m755 -s $(OUT_EXAMPLES) $(DESTDIR)/bin |
| 508 |
$(INSTALL) -m644 $(HDRS_INSTALLED) $(DESTDIR)/include/webp |
| 509 |
$(INSTALL) -m644 $(SHARPYUV_HDRS_INSTALLED) $(DESTDIR)/include/webp/sharpyuv |
| 510 |
$(INSTALL) -m644 src/libwebp.a $(DESTDIR)/lib |
| 511 |
$(INSTALL) -m644 src/demux/libwebpdemux.a $(DESTDIR)/lib |
| 512 |
$(INSTALL) -m644 src/mux/libwebpmux.a $(DESTDIR)/lib |
| 513 |
$(INSTALL) -m644 sharpyuv/libsharpyuv.a $(DESTDIR)/lib |
| 514 |
umask 022; \ |
| 515 |
for m in man/[cdv]webp.1 man/gif2webp.1 man/webpmux.1 \ |
| 516 |
man/img2webp.1 man/webpinfo.1; do \ |
| 517 |
basenam=$$(basename $$m .1); \ |
| 518 |
$(GROFF) -t -e -man -T ascii $$m \ |
| 519 |
| $(COL) -bx >$(DESTDIR)/doc/$${basenam}.txt; \ |
| 520 |
$(GROFF) -t -e -man -T html $$m \ |
| 521 |
| $(COL) -bx >$(DESTDIR)/doc/$${basenam}.html; \ |
| 522 |
done |
| 523 |
|
| 524 |
clean: |
| 525 |
$(RM) $(OUTPUT) *~ \ |
| 526 |
examples/*.o examples/*~ \ |
| 527 |
extras/*.o extras/*~ \ |
| 528 |
imageio/*.o imageio/*~ \ |
| 529 |
sharpyuv/*.o sharpyuv/*~ \ |
| 530 |
src/dec/*.o src/dec/*~ \ |
| 531 |
src/demux/*.o src/demux/*~ \ |
| 532 |
src/dsp/*.o src/dsp/*~ \ |
| 533 |
src/enc/*.o src/enc/*~ \ |
| 534 |
src/mux/*.o src/mux/*~ \ |
| 535 |
src/utils/*.o src/utils/*~ \ |
| 536 |
src/webp/*~ man/*~ doc/*~ swig/*~ \ |
| 537 |
|
| 538 |
.PHONY: all clean dist ex |
| 539 |
.SUFFIXES: |