You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
935 B

repo = github.com/talgo-cloud/talgo-libwebp
build_dir = /tmp
cur_dir = $(shell pwd)
libwebp_so = ${LIBWEBP_PREFIX}/lib/libwebp.so
LIBWEBP_VERSION ?= 0.5.1
all: test
test:
go test -v $(repo)/...
libwebp: $(libwebp_so)
$(libwebp_so):
cd $(build_dir) \
&& wget http://downloads.webmproject.org/releases/webp/libwebp-$(LIBWEBP_VERSION).tar.gz \
&& tar xf libwebp-$(LIBWEBP_VERSION).tar.gz \
&& cd libwebp-$(LIBWEBP_VERSION) \
&& ./configure --prefix=$(LIBWEBP_PREFIX) --enable-libwebpmux \
&& make \
&& make install
docker-test:
docker run -v $(cur_dir):/go/src/$(repo) -it go-libwebp:$(LIBWEBP_VERSION)
docker-sh:
docker run -v $(cur_dir):/go/src/$(repo) -it go-libwebp:$(LIBWEBP_VERSION) sh
docker-build:
docker build -t go-libwebp:$(LIBWEBP_VERSION) .
docker-clean:
docker rm $$(docker ps -a -q -f "ancestor=go-libwebp")
.PHONY: \
all \
test \
libwebp \
docker-test \
docker-sh \
docker-build \
docker-clean