summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild16
1 files changed, 10 insertions, 6 deletions
diff --git a/build b/build
index 1988161..beba2eb 100755
--- a/build
+++ b/build
@@ -30,14 +30,16 @@ bootstrap1_opts = \
--disable-libmudflap \
--disable-libssp
-target = $(OPK_HOST_ARCH)
-builddir = gcc-build
-destdir = dest
+include ../targets.mk
+target = $$(printf '%s' '$@' | sed 's/^[a-z]*-//')
+builddir = obj-$(target)
+destdir = dest-$(target)
nop:
@:
-configure:
+configure: $(configure_targets)
+$(configure_targets):
if [ 'x$(OPK_HOST_PLAT)' = 'xbootstrap1' ]; then \
oh-autoconfigure -B "$(builddir)" -t "$(target)" -- \
$(bootstrap1_opts); \
@@ -47,7 +49,8 @@ configure:
fi
touch $@
-build: configure
+build: $(build_targets)
+$(build_targets): configure
libsubdir="/usr/lib/$(target)/gcc-$(base_version)" && \
oh-autobuild -B "$(builddir)" -T bootstrap-lean -- -j $${JOBS:-1} \
libsubdir="$${libsubdir}" \
@@ -58,7 +61,8 @@ build: configure
MULTIOSDIR=
touch $@
-install: build
+install: $(install_targets)
+$(install_targets): build
# The -T option is necessary because otherwise:
# * oh-autoinstall checks for an "install" target by running make with
# the -n option,