From bce1fd95ebb1229a393381d9fc4f3258abe2fc56 Mon Sep 17 00:00:00 2001
From: Patrick McDermott <patrick.mcdermott@libiquity.com>
Date: Tue, 02 Apr 2019 01:56:10 -0400
Subject: build: Build out-of-tree

---
(limited to 'build')

diff --git a/build b/build
index a97eceb..c1d86f4 100755
--- a/build
+++ b/build
@@ -2,20 +2,26 @@
 
 include ../source.mk
 
+common_opts = \
+	--disable-shared \
+	--disable-curl --disable-ssl-curl \
+	--enable-sha256 \
+	--with-opkglibdir=/var/lib
+
 nop:
 	@:
 
-build:
-	oh-autoconfigure -- \
-		--disable-shared \
-		--disable-curl --disable-ssl-curl --disable-gpg \
-		--enable-sha256 \
-		--with-opkglibdir=/var/lib
-	oh-autobuild
+build-opkg:
+	oh-autoconfigure -B obj-opkg -- \
+		$(common_opts) \
+		--disable-gpg
+	oh-autobuild -B obj-opkg
 	touch $@
 
+build: build-opkg
+
 install: build
-	oh-autoinstall
+	oh-autoinstall -B obj-opkg
 	rm -Rf dest/usr/include/ \
 		dest/usr/lib/$(OPK_HOST_ARCH)/pkgconfig/ \
 		dest/usr/lib/$(OPK_HOST_ARCH)/libopkg.a \
--
cgit v0.9.1