From 6c6528e3a508c8ab357b58e9744dd86ebf3e6914 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 12 Nov 2018 20:21:52 -0500 Subject: automate dependency building --- deps/Makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 deps/Makefile (limited to 'deps/Makefile') diff --git a/deps/Makefile b/deps/Makefile new file mode 100644 index 0000000..0089102 --- /dev/null +++ b/deps/Makefile @@ -0,0 +1,44 @@ +HOST=arm-linux-gnueabihf +PREFIX=/usr/$(HOST) + +PKGCONFIG_PATH=/usr/$(HOST)/lib/pkgconfig + +ZLIB_VERSION=1.2.11 +LIBPNG16_VERSION=1.6.35 +IMAGEMAGICK_VERSION=7.0.8-14 + +all: imagemagick.installed + +zlib.installed: + pkg-config --modversion zlib > $@ || $(MAKE) install-zlib + +install-zlib: + wget http://www.zlib.net/zlib-$(ZLIB_VERSION).tar.gz + tar xvzf zlib-$(ZLIB_VERSION).tar.gz + cd zlib-$(ZLIB_VERSION); CHOST=$(HOST) ./configure --static --prefix=$(PREFIX) + cd zlib-$(ZLIB_VERSION); $(MAKE) && sudo $(MAKE) install + pkg-config --modversion zlib > zlib.installed + +libpng16.installed: + pkg-config --modversion libpng16 > $@ || $(MAKE) install-libpng16 + +install-libpng16: zlib.installed + wget https://download.sourceforge.net/libpng/libpng-$(LIBPNG16_VERSION).tar.gz + tar xvzf libpng-$(LIBPNG16_VERSION).tar.gz + cd libpng-$(LIBPNG16_VERSION); ./configure --prefix=$(PREFIX) --host=$(HOST) + cd libpng-$(LIBPNG16_VERSION); $(MAKE) && sudo $(MAKE) install + pkg-config --modversion libpng16 > libpng16.installed + +imagemagick.installed: + pkg-config --modversion MagickCore > $@ || $(MAKE) install-imagemagick + +install-imagemagick: libpng16.installed + wget https://imagemagick.org/download/ImageMagick.tar.gz + tar xvzf ImageMagick.tar.gz + cd ImageMagick-$(IMAGEMAGICK_VERSION); ./configure --host=$(HOST) --without-utilities --disable-shared --prefix=$(PREFIX) --disable-openmp --disable-docs + cd ImageMagick-$(IMAGEMAGICK_VERSION); $(MAKE) && sudo $(MAKE) install + + +clean: + rm -f *.installed + rm -rf zlib-$(ZLIB_VERSION) libpng-$(LIBPNG16_VERSION) ImageMagic-$(IMAGEMAGICK_VERSION) -- cgit v1.2.1