From c2de406d0454a1f2475835e69ff31d0fb5e5ee58 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 22 Apr 2013 13:34:30 -0400 Subject: build: Support multiple target architectures. --- (limited to 'build') 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, -- cgit v0.9.1