diff --git a/Makefile.am b/Makefile.am index ceee75d4..7dc4c639 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src examples man EXTRA_DIST = COPYING autogen.sh + +if WANT_EXTRAS + SUBDIRS += extras +endif diff --git a/configure.ac b/configure.ac index 8c22fddb..ccf70f1b 100644 --- a/configure.ac +++ b/configure.ac @@ -672,13 +672,12 @@ dnl ========================= AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([src/webp/config.h]) 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/demux/Makefile src/mux/Makefile \ - src/utils/Makefile src/extras/Makefile \ + src/utils/Makefile \ src/libwebp.pc src/libwebpdecoder.pc \ - src/demux/libwebpdemux.pc src/mux/libwebpmux.pc \ - src/extras/libwebpextras.pc]) + src/demux/libwebpdemux.pc src/mux/libwebpmux.pc]) AC_OUTPUT diff --git a/extras/Makefile.am b/extras/Makefile.am new file mode 100644 index 00000000..143693fc --- /dev/null +++ b/extras/Makefile.am @@ -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 diff --git a/src/extras/extras.c b/extras/extras.c similarity index 99% rename from src/extras/extras.c rename to extras/extras.c index ca32fbcd..2f42450a 100644 --- a/src/extras/extras.c +++ b/extras/extras.c @@ -10,7 +10,7 @@ // Additional WebP utilities. // -#include "../webp/extras.h" +#include "./extras.h" #include diff --git a/src/webp/extras.h b/extras/extras.h similarity index 97% rename from src/webp/extras.h rename to extras/extras.h index 1c24be2e..119c01c6 100644 --- a/src/webp/extras.h +++ b/extras/extras.h @@ -11,13 +11,13 @@ #ifndef WEBP_WEBP_EXTRAS_H_ #define WEBP_WEBP_EXTRAS_H_ -#include "./types.h" +#include "webp/types.h" #ifdef __cplusplus extern "C" { #endif -#include "./encode.h" +#include "webp/encode.h" #define WEBP_EXTRAS_ABI_VERSION 0x0000 // MAJOR(8b) + MINOR(8b) diff --git a/makefile.unix b/makefile.unix index 4975f132..cb804056 100644 --- a/makefile.unix +++ b/makefile.unix @@ -3,7 +3,7 @@ # It will not install the libraries system-wide, but just create the 'cwebp' # and 'dwebp' tools in the examples/ directory, along with the static # 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: # make -f makefile.unix @@ -251,7 +251,7 @@ UTILS_ENC_OBJS = \ src/utils/quant_levels.o \ EXTRA_OBJS = \ - src/extras/extras.o \ + extras/extras.o \ LIBWEBPDECODER_OBJS = $(DEC_OBJS) $(DSP_DEC_OBJS) $(UTILS_DEC_OBJS) LIBWEBP_OBJS = $(LIBWEBPDECODER_OBJS) $(ENC_OBJS) $(DSP_ENC_OBJS) \ @@ -307,7 +307,7 @@ HDRS = \ $(HDRS_INSTALLED) \ 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 EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux \ examples/anim_diff @@ -340,11 +340,11 @@ examples/libanim_util.a: $(ANIM_UTIL_OBJS) examples/libexample_dec.a: $(EX_FORMAT_DEC_OBJS) examples/libexample_util.a: $(EX_UTIL_OBJS) examples/libgifdec.a: $(GIFDEC_OBJS) +extras/libwebpextras.a: $(LIBWEBPEXTRA_OBJS) src/libwebpdecoder.a: $(LIBWEBPDECODER_OBJS) src/libwebp.a: $(LIBWEBP_OBJS) src/mux/libwebpmux.a: $(LIBWEBPMUX_OBJS) src/demux/libwebpdemux.a: $(LIBWEBPDEMUX_OBJS) -src/libwebpextras.a: $(LIBWEBPEXTRA_OBJS) %.a: $(AR) $(ARFLAGS) $@ $^ @@ -402,11 +402,11 @@ dist: all clean: $(RM) $(OUTPUT) *~ \ examples/*.o examples/*~ \ + extras/*.o extras/*~ \ src/dec/*.o src/dec/*~ \ src/demux/*.o src/demux/*~ \ src/dsp/*.o src/dsp/*~ \ src/enc/*.o src/enc/*~ \ - src/extras/*.o src/extras/*~ \ src/mux/*.o src/mux/*~ \ src/utils/*.o src/utils/*~ \ src/webp/*~ man/*~ doc/*~ swig/*~ \ diff --git a/src/Makefile.am b/src/Makefile.am index 8567c6f0..e0cff0c0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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. SUBDIRS = dec enc dsp utils . if WANT_MUX @@ -7,9 +7,6 @@ endif if WANT_DEMUX SUBDIRS += demux endif -if WANT_EXTRAS - SUBDIRS += extras -endif lib_LTLIBRARIES = libwebp.la diff --git a/src/extras/Makefile.am b/src/extras/Makefile.am deleted file mode 100644 index 6598676e..00000000 --- a/src/extras/Makefile.am +++ /dev/null @@ -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 diff --git a/src/extras/libwebpextras.pc.in b/src/extras/libwebpextras.pc.in deleted file mode 100644 index a2e28f2e..00000000 --- a/src/extras/libwebpextras.pc.in +++ /dev/null @@ -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