#!/usr/bin/make -f include ../source.mk builddir = build.$$(printf '%s' $@ | sed 's/^[^_]*_//') destdir = dest.$$(printf '%s' $@ | sed 's/^[^_]*_//') variant = $$(printf '%s' $@ | sed 's/^[^_]*_//') abi_ver = $$(printf '%s' '$(OPK_SOURCE)' | sed 's/^.*[.]//') common_opts = \ --disable-memory \ --enable-singlethreaded \ --disable-oldnames \ --disable-examples \ --enable-ocsp --enable-ocspstapling --enable-ocspstapling2 \ --disable-oldtls \ --enable-sni \ --disable-aescbc \ --disable-md5 \ --enable-maxstrength build_std_opts = $(common_opts) \ --disable-errorstrings build_dbg_opts = $(common_opts) \ --enable-debug common_cflags = \ -DNO_SESSION_CACHE build_std_cflags = $(common_cflags) build_dbg_cflags = $(common_cflags) arch = $(OPK_HOST_ARCH) nop: @: fix: chmod a+x \ src/build-aux/compile \ src/build-aux/config.guess \ src/build-aux/config.sub \ src/build-aux/depcomp \ src/build-aux/install-sh \ src/build-aux/missing \ src/build-aux/test-driver \ src/configure touch src/aclocal.m4 src/configure src/Makefile.in src/config.in touch $@ build_std build_dbg: fix oh-autoconfigure -B $(builddir) -- $($@_opts) CFLAGS='$($@_cflags)' oh-autobuild -B $(builddir) touch $@ build: build_std build_dbg install_std install_dbg: build oh-autoinstall -B $(builddir) -d $(destdir) rm -Rf \ $(destdir)/usr/lib/$(arch)/libwolfssl.la \ $(destdir)/usr/share/doc/wolfssl/example/ \ $(destdir)/usr/share/doc/wolfssl/README.txt \ $(destdir)/usr/share/doc/wolfssl/taoCert.txt oh-fixperms -d $(destdir) set -e; \ lib="$$(ls $(destdir)/usr/lib/$(arch)/libwolfssl.so.$(abi_ver).*)"; \ mv "$${lib}" "$${lib}.$(variant)" set -e; if [ x"$(variant)" != x'dbg' ]; then \ oh-strip -d $(destdir); \ OPK_PACKAGES="\ libwolfssl.$(abi_ver) \ libwolfssl.$(abi_ver)-dev \ " oh-installfiles -d $(destdir); \ else \ rm -Rf \ $(destdir)/usr/include/ \ $(destdir)/usr/lib/$(arch)/libwolfssl.so \ $(destdir)/usr/lib/$(arch)/pkgconfig/wolfssl.pc \ $(destdir)/usr/bin/wolfssl-config; \ OPK_PACKAGES="\ libwolfssl.$(abi_ver)-dbg \ " oh-installfiles -d $(destdir); \ fi install: install_std install_dbg oh-shlibdeps