summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-08-02 03:13:57 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-08-02 03:58:38 (EDT)
commita771f8fc47b4631c6b030d339496032784a97981 (patch)
tree1d845c0cc7d17ae2dfd583aa3dafcd28b7ad5028 /build
parentf809865671e7f224a3501f05374fa24d0bc09481 (diff)
build: Build client and full variants
TODO: Debugging symbols aren't installed right.
Diffstat (limited to 'build')
-rwxr-xr-xbuild70
1 files changed, 46 insertions, 24 deletions
diff --git a/build b/build
index 5f83866..b23b3e5 100755
--- a/build
+++ b/build
@@ -2,10 +2,34 @@
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 \
+ --disable-errorstrings
+build_client_opts = $(common_opts)
+build_full_opts = $(common_opts)
+common_cflags = \
+ -DNO_SESSION_CACHE
+build_client_cflags = $(common_cflags) \
+ -DNO_WOLFSSL_SERVER
+build_full_cflags = $(common_cflags)
+
nop:
@:
-build:
+fix:
chmod a+x \
src/build-aux/compile \
src/build-aux/config.guess \
@@ -16,30 +40,28 @@ build:
src/build-aux/test-driver \
src/configure
touch src/aclocal.m4 src/configure src/Makefile.in src/config.in
- oh-autoconfigure -- \
- --disable-memory \
- --enable-singlethreaded \
- --disable-oldnames \
- --disable-examples \
- --enable-ocsp --enable-ocspstapling --enable-ocspstapling2 \
- --disable-oldtls \
- --enable-sni \
- --disable-aescbc \
- --disable-md5 \
- --enable-maxstrength \
- --disable-errorstrings \
- CFLAGS='-DNO_WOLFSSL_SERVER -DNO_SESSION_CACHE'
- oh-autobuild
touch $@
-install: build
- oh-autoinstall
+build_client build_full: fix
+ oh-autoconfigure -B $(builddir) -- $($@_opts) CFLAGS='$($@_cflags)'
+ oh-autobuild -B $(builddir)
+ touch $@
+
+build: build_client build_full
+
+install_client install_full: build
+ oh-autoinstall -B $(builddir) -d $(destdir)
rm -Rf \
- dest/usr/lib/$(OPK_HOST_ARCH)/libwolfssl.la \
- dest/usr/share/doc/wolfssl/example/ \
- dest/usr/share/doc/wolfssl/README.txt \
- dest/usr/share/doc/wolfssl/taoCert.txt
- oh-fixperms
- oh-strip -k
- oh-installfiles
+ $(destdir)/usr/lib/$(OPK_HOST_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)
+ oh-strip -d $(destdir) -k
+ OPK_PACKAGES="\
+ libwolfssl.$(abi_ver)-$(variant) \
+ libwolfssl.$(abi_ver)-$(variant)-dev \
+ " oh-installfiles -d $(destdir)
+
+install: install_client install_full
oh-shlibdeps