summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-04-26 12:10:20 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-04-26 12:10:20 (EDT)
commit74b6031b46d3399c9f856a099d758ea88a40fdb9 (patch)
tree9f6ec99d27d10e22a021cba67daf4a0f7014823a /build
parent826858aad80a6878dc6f85824fa05a5b5b4f217c (diff)
Add installnative & installcross targets to build.
Diffstat (limited to 'build')
-rwxr-xr-xbuild30
1 files changed, 27 insertions, 3 deletions
diff --git a/build b/build
index 2e9dc20..c66c576 100755
--- a/build
+++ b/build
@@ -84,6 +84,13 @@ $(install_targets): build
fincludedir="$${libsubdir}/finclude" \
toolexeclibdir="/usr/lib/$(target)" \
MULTIOSDIR=
+ if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \
+ $(MAKE) -f ../build "installnative-$(target)"; \
+ else \
+ $(MAKE) -f ../build "installcross-$(target)"; \
+ fi
+
+$(installnative_targets):
# Change the target architecture prefix of files in /usr/bin.
rm -f $(destdir)/usr/bin/*-gcc-$(base_version).*
for f in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do \
@@ -192,9 +199,6 @@ $(install_targets): build
gcc-$(base_version)-$(target) \
cpp-$(base_version)-$(target) \
g++-$(base_version)-$(target) \
- "; \
- if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \
- OPK_PACKAGES="$${OPK_PACKAGES} \
libgcc.1 \
libssp.0 \
libgomp.1 \
@@ -209,6 +213,26 @@ $(install_targets): build
export OPK_PACKAGES; \
oh-installfiles -d "$(destdir)"
+$(installcross_targets):
+ # Change the target architecture prefix of files in /usr/bin.
+ rm -f $(destdir)/usr/bin/*-gcc-$(base_version).*
+ for f in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do \
+ rm -f $(destdir)/usr/bin/$${f}-$(base_version); \
+ mv $(destdir)/usr/bin/*-$${f}-$(base_version) \
+ $(destdir)/usr/bin/$(target)-$$(printf '%s' \
+ $(destdir)/usr/bin/*-$${f}-$(base_version) | \
+ sed "s/^.*-\($${f}\)/\1/"); \
+ done
+ oh-fixperms -d "$(destdir)"
+ oh-strip -d "$(destdir)"
+ OPK_PACKAGES="\
+ gcc-$(base_version)-$(target) \
+ cpp-$(base_version)-$(target) \
+ g++-$(base_version)-$(target) \
+ "; \
+ export OPK_PACKAGES; \
+ oh-installfiles -d "$(destdir)"
+
install: $(install_targets)
# POSIX.1-2008: