Merge "makefile.unix: dist related changes" into 0.3.0

This commit is contained in:
James Zern 2013-03-18 16:53:46 -07:00 committed by Gerrit Code Review
commit 1fc8ffca35

View File

@ -168,7 +168,9 @@ LIBWEBPDEMUX_OBJS = $(DEMUX_OBJS)
HDRS_INSTALLED = \ HDRS_INSTALLED = \
src/webp/decode.h \ src/webp/decode.h \
src/webp/demux.h \
src/webp/encode.h \ src/webp/encode.h \
src/webp/mux.h \
src/webp/types.h \ src/webp/types.h \
HDRS = \ HDRS = \
@ -191,22 +193,22 @@ HDRS = \
src/utils/quant_levels_dec.h \ src/utils/quant_levels_dec.h \
src/utils/rescaler.h \ src/utils/rescaler.h \
src/utils/thread.h \ src/utils/thread.h \
src/webp/demux.h \
src/webp/format_constants.h \ src/webp/format_constants.h \
src/webp/mux.h \
src/webp/mux_types.h \ src/webp/mux_types.h \
$(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
OUT_EXAMPLES = examples/cwebp examples/dwebp OUT_EXAMPLES = examples/cwebp examples/dwebp
EXTRA_EXAMPLES = examples/gif2webp examples/vwebp examples/webpmux
OUTPUT = $(OUT_LIBS) $(OUT_EXAMPLES) OUTPUT = $(OUT_LIBS) $(OUT_EXAMPLES)
ifeq ($(MAKECMDGOALS),clean) ifeq ($(MAKECMDGOALS),clean)
OUTPUT += examples/gif2webp examples/vwebp examples/webpmux OUTPUT += $(EXTRA_EXAMPLES)
OUTPUT += src/demux/libwebpdemux.a src/mux/libwebpmux.a OUTPUT += src/demux/libwebpdemux.a src/mux/libwebpmux.a
endif endif
all: ex ex: $(OUT_EXAMPLES)
all: ex $(EXTRA_EXAMPLES)
$(EX_FORMAT_DEC_OBJS): %.o: %.h $(EX_FORMAT_DEC_OBJS): %.o: %.h
@ -222,8 +224,6 @@ src/demux/libwebpdemux.a: $(LIBWEBPDEMUX_OBJS)
%.a: %.a:
$(AR) $(ARFLAGS) $@ $^ $(AR) $(ARFLAGS) $@ $^
ex: $(OUT_EXAMPLES)
examples/cwebp: examples/cwebp.o $(EX_FORMAT_DEC_OBJS) examples/cwebp: examples/cwebp.o $(EX_FORMAT_DEC_OBJS)
examples/dwebp: examples/dwebp.o examples/dwebp: examples/dwebp.o
examples/gif2webp: examples/gif2webp.o examples/gif2webp: examples/gif2webp.o
@ -242,18 +242,21 @@ examples/vwebp: EXTRA_LIBS += $(GL_LIBS)
examples/webpmux: examples/libexample_util.a src/mux/libwebpmux.a examples/webpmux: examples/libexample_util.a src/mux/libwebpmux.a
examples/webpmux: src/libwebpdecoder.a examples/webpmux: src/libwebpdecoder.a
$(OUT_EXAMPLES) examples/gif2webp examples/vwebp examples/webpmux: $(OUT_EXAMPLES) $(EXTRA_EXAMPLES):
$(CC) -o $@ $^ $(LDFLAGS) $(CC) -o $@ $^ $(LDFLAGS)
dist: DESTDIR := dist dist: DESTDIR := dist
dist: OUT_EXAMPLES += $(EXTRA_EXAMPLES)
dist: all dist: all
$(INSTALL) -m755 -d $(DESTDIR)/include/webp \ $(INSTALL) -m755 -d $(DESTDIR)/include/webp \
$(DESTDIR)/doc $(DESTDIR)/lib $(DESTDIR)/doc $(DESTDIR)/lib
$(INSTALL) -m755 -s $(OUT_EXAMPLES) $(DESTDIR) $(INSTALL) -m755 -s $(OUT_EXAMPLES) $(DESTDIR)
$(INSTALL) -m644 $(HDRS_INSTALLED) $(DESTDIR)/include/webp $(INSTALL) -m644 $(HDRS_INSTALLED) $(DESTDIR)/include/webp
$(INSTALL) -m644 src/libwebp.a $(DESTDIR)/lib $(INSTALL) -m644 src/libwebp.a $(DESTDIR)/lib
$(INSTALL) -m644 src/demux/libwebpdemux.a $(DESTDIR)/lib
$(INSTALL) -m644 src/mux/libwebpmux.a $(DESTDIR)/lib
umask 022; \ umask 022; \
for m in man/[cd]webp.1; do \ for m in man/[cd]webp.1 man/gif2webp.1 man/webpmux.1; do \
basenam=$$(basename $$m .1); \ basenam=$$(basename $$m .1); \
$(GROFF) -t -e -man -T utf8 $$m \ $(GROFF) -t -e -man -T utf8 $$m \
| $(COL) -bx >$(DESTDIR)/doc/$${basenam}.txt; \ | $(COL) -bx >$(DESTDIR)/doc/$${basenam}.txt; \