From 207cc600808b40a882b54aae61085632ec2776aa Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 26 Apr 2013 17:37:13 -0400 Subject: Add buildnative and buildcross targets to build. --- diff --git a/build b/build index 79d70b6..b7216bd 100755 --- a/build +++ b/build @@ -52,6 +52,14 @@ configure: $(configure_targets) touch $@ $(build_targets): configure + if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \ + $(MAKE) -f ../build "buildnative-$(target)"; \ + else \ + $(MAKE) -f ../build "buildcross-$(target)"; \ + fi + touch $@ + +$(buildnative_targets): libsubdir="/usr/lib/$(target)/gcc-$(base_version)" && \ oh-autobuild -B "$(builddir)" -T bootstrap-lean -- -j $${JOBS:-1} \ libsubdir="$${libsubdir}" \ @@ -60,7 +68,16 @@ $(build_targets): configure fincludedir="$${libsubdir}/finclude" \ toolexeclibdir="/usr/lib/$(target)" \ MULTIOSDIR= - touch $@ + +$(buildcross_targets): + libsubdir="/usr/lib/$(target)/gcc-$(base_version)" && \ + oh-autobuild -B "$(builddir)" -T all-gcc -- -j $${JOBS:-1} \ + libsubdir="$${libsubdir}" \ + libexecsubdir="$${libsubdir}" \ + libsubincludedir="$${libsubdir}/include" \ + fincludedir="$${libsubdir}/finclude" \ + toolexeclibdir="/usr/lib/$(target)" \ + MULTIOSDIR= build: $(build_targets) touch $@ diff --git a/config b/config index 6603113..a140b18 100755 --- a/config +++ b/config @@ -18,8 +18,8 @@ main() PKG_TARGET_ARCH="${arch}" configure_build done >targets.mk - for stamp in configure build install \ - installnative installcross; do + for stamp in configure build buildnative buildcross \ + install installnative installcross; do printf '%s_targets = \\\n' "${stamp}" \ >>targets.mk for arch in ${PKG_TARGETS}; do -- cgit v0.9.1