move src/extras to the top-level

reserve src/ for the code of the main libraries: libwebp, libwebpdemux
and libwebpmux

+ demote this library to internal only; i.e., don't install the header +
lib with make install

Change-Id: I8c9844db8f494be0fa0a2549a5b75b5cebcf666d
This commit is contained in:
James Zern 2016-07-19 15:23:08 -07:00
parent 9ac74f922e
commit ad497fbce3
9 changed files with 27 additions and 40 deletions

View File

@ -1,3 +1,7 @@
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src examples man SUBDIRS = src examples man
EXTRA_DIST = COPYING autogen.sh EXTRA_DIST = COPYING autogen.sh
if WANT_EXTRAS
SUBDIRS += extras
endif

View File

@ -672,13 +672,12 @@ dnl =========================
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/webp/config.h]) AC_CONFIG_HEADERS([src/webp/config.h])
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile \ AC_CONFIG_FILES([Makefile src/Makefile man/Makefile \
examples/Makefile src/dec/Makefile \ examples/Makefile extras/Makefile src/dec/Makefile \
src/enc/Makefile src/dsp/Makefile \ src/enc/Makefile src/dsp/Makefile \
src/demux/Makefile src/mux/Makefile \ src/demux/Makefile src/mux/Makefile \
src/utils/Makefile src/extras/Makefile \ src/utils/Makefile \
src/libwebp.pc src/libwebpdecoder.pc \ src/libwebp.pc src/libwebpdecoder.pc \
src/demux/libwebpdemux.pc src/mux/libwebpmux.pc \ src/demux/libwebpdemux.pc src/mux/libwebpmux.pc])
src/extras/libwebpextras.pc])
AC_OUTPUT AC_OUTPUT

11
extras/Makefile.am Normal file
View File

@ -0,0 +1,11 @@
AM_CPPFLAGS += -I$(top_builddir)/src -I$(top_srcdir)/src
lib_LTLIBRARIES = libwebpextras.la
noinst_HEADERS =
noinst_HEADERS += ../src/webp/types.h
libwebpextras_la_SOURCES =
libwebpextras_la_SOURCES += extras.c extras.h
libwebpextras_la_CPPFLAGS = $(AM_CPPFLAGS)
libwebpextras_la_LIBADD = ../src/libwebp.la

View File

@ -10,7 +10,7 @@
// Additional WebP utilities. // Additional WebP utilities.
// //
#include "../webp/extras.h" #include "./extras.h"
#include <string.h> #include <string.h>

View File

@ -11,13 +11,13 @@
#ifndef WEBP_WEBP_EXTRAS_H_ #ifndef WEBP_WEBP_EXTRAS_H_
#define WEBP_WEBP_EXTRAS_H_ #define WEBP_WEBP_EXTRAS_H_
#include "./types.h" #include "webp/types.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include "./encode.h" #include "webp/encode.h"
#define WEBP_EXTRAS_ABI_VERSION 0x0000 // MAJOR(8b) + MINOR(8b) #define WEBP_EXTRAS_ABI_VERSION 0x0000 // MAJOR(8b) + MINOR(8b)

View File

@ -3,7 +3,7 @@
# It will not install the libraries system-wide, but just create the 'cwebp' # It will not install the libraries system-wide, but just create the 'cwebp'
# and 'dwebp' tools in the examples/ directory, along with the static # and 'dwebp' tools in the examples/ directory, along with the static
# libraries 'src/libwebp.a', 'src/libwebpdecoder.a', 'src/mux/libwebpmux.a', # libraries 'src/libwebp.a', 'src/libwebpdecoder.a', 'src/mux/libwebpmux.a',
# 'src/demux/libwebpdemux.a' and 'src/libwebpextras.a'. # 'src/demux/libwebpdemux.a' and 'extras/libwebpextras.a'.
# #
# To build the library and examples, use: # To build the library and examples, use:
# make -f makefile.unix # make -f makefile.unix
@ -251,7 +251,7 @@ UTILS_ENC_OBJS = \
src/utils/quant_levels.o \ src/utils/quant_levels.o \
EXTRA_OBJS = \ EXTRA_OBJS = \
src/extras/extras.o \ extras/extras.o \
LIBWEBPDECODER_OBJS = $(DEC_OBJS) $(DSP_DEC_OBJS) $(UTILS_DEC_OBJS) LIBWEBPDECODER_OBJS = $(DEC_OBJS) $(DSP_DEC_OBJS) $(UTILS_DEC_OBJS)
LIBWEBP_OBJS = $(LIBWEBPDECODER_OBJS) $(ENC_OBJS) $(DSP_ENC_OBJS) \ LIBWEBP_OBJS = $(LIBWEBPDECODER_OBJS) $(ENC_OBJS) $(DSP_ENC_OBJS) \
@ -307,7 +307,7 @@ HDRS = \
$(HDRS_INSTALLED) \ $(HDRS_INSTALLED) \
OUT_LIBS = examples/libexample_util.a src/libwebpdecoder.a src/libwebp.a OUT_LIBS = examples/libexample_util.a src/libwebpdecoder.a src/libwebp.a
EXTRA_LIB = src/libwebpextras.a EXTRA_LIB = extras/libwebpextras.a
OUT_EXAMPLES = examples/cwebp examples/dwebp OUT_EXAMPLES = examples/cwebp examples/dwebp
EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \ EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \
examples/anim_diff examples/anim_diff
@ -340,11 +340,11 @@ examples/libanim_util.a: $(ANIM_UTIL_OBJS)
examples/libexample_dec.a: $(EX_FORMAT_DEC_OBJS) examples/libexample_dec.a: $(EX_FORMAT_DEC_OBJS)
examples/libexample_util.a: $(EX_UTIL_OBJS) examples/libexample_util.a: $(EX_UTIL_OBJS)
examples/libgifdec.a: $(GIFDEC_OBJS) examples/libgifdec.a: $(GIFDEC_OBJS)
extras/libwebpextras.a: $(LIBWEBPEXTRA_OBJS)
src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS) src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS)
src/libwebp.a: $(LIBWEBP_OBJS) src/libwebp.a: $(LIBWEBP_OBJS)
src/mux/libwebpmux.a: $(LIBWEBPMUX_OBJS) src/mux/libwebpmux.a: $(LIBWEBPMUX_OBJS)
src/demux/libwebpdemux.a: $(LIBWEBPDEMUX_OBJS) src/demux/libwebpdemux.a: $(LIBWEBPDEMUX_OBJS)
src/libwebpextras.a: $(LIBWEBPEXTRA_OBJS)
%.a: %.a:
$(AR) $(ARFLAGS) $@ $^ $(AR) $(ARFLAGS) $@ $^
@ -402,11 +402,11 @@ dist: all
clean: clean:
$(RM) $(OUTPUT) *~ \ $(RM) $(OUTPUT) *~ \
examples/*.o examples/*~ \ examples/*.o examples/*~ \
extras/*.o extras/*~ \
src/dec/*.o src/dec/*~ \ src/dec/*.o src/dec/*~ \
src/demux/*.o src/demux/*~ \ src/demux/*.o src/demux/*~ \
src/dsp/*.o src/dsp/*~ \ src/dsp/*.o src/dsp/*~ \
src/enc/*.o src/enc/*~ \ src/enc/*.o src/enc/*~ \
src/extras/*.o src/extras/*~ \
src/mux/*.o src/mux/*~ \ src/mux/*.o src/mux/*~ \
src/utils/*.o src/utils/*~ \ src/utils/*.o src/utils/*~ \
src/webp/*~ man/*~ doc/*~ swig/*~ \ src/webp/*~ man/*~ doc/*~ swig/*~ \

View File

@ -1,4 +1,4 @@
# The mux, demux and extras libraries depend on libwebp, thus the '.' to force # The mux and demux libraries depend on libwebp, thus the '.' to force
# the build order so it's available to them. # the build order so it's available to them.
SUBDIRS = dec enc dsp utils . SUBDIRS = dec enc dsp utils .
if WANT_MUX if WANT_MUX
@ -7,9 +7,6 @@ endif
if WANT_DEMUX if WANT_DEMUX
SUBDIRS += demux SUBDIRS += demux
endif endif
if WANT_EXTRAS
SUBDIRS += extras
endif
lib_LTLIBRARIES = libwebp.la lib_LTLIBRARIES = libwebp.la

View File

@ -1,13 +0,0 @@
lib_LTLIBRARIES = libwebpextras.la
libwebpextras_la_SOURCES =
libwebpextras_la_SOURCES += extras.c
libwebpextrasinclude_HEADERS =
libwebpextrasinclude_HEADERS += ../webp/extras.h
libwebpextrasinclude_HEADERS += ../webp/types.h
libwebpextras_la_LIBADD = ../libwebp.la
libwebpextras_la_LDFLAGS = -no-undefined -version-info 0:0:0
libwebpextrasincludedir = $(includedir)/webp
pkgconfig_DATA = libwebpextras.pc

View File

@ -1,11 +0,0 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libwebpextras
Description: Additional utility functions useful in processing WebP files
Version: @PACKAGE_VERSION@
Requires: libwebp >= 0.5.0
Cflags: -I${includedir}
Libs: -L${libdir} -lwebpextras