r1659

stsp at user.in-berlin.de stsp at user.in-berlin.de
Fri Dec 22 14:40:59 CET 2006


Author: stsp
Date: 2006-12-22 14:40:53 +0100 (Fri, 22 Dec 2006)
New Revision: 1659

Log:
Add Makefile target to spawn cross-compilation shell.
Great idea, John, thanks :-)


Added:
   trunk/Makefile.xsh

Modified:
   trunk/Makefile

Modified: trunk/Makefile
===================================================================
--- trunk/Makefile	2006-12-22 02:40:17 UTC (rev 1658)
+++ trunk/Makefile	2006-12-22 13:40:53 UTC (rev 1659)
@@ -363,3 +363,6 @@
 	 done
 
 ############################################################################
+
+xsh:
+	@$(MAKE) -f Makefile.$@

Added: trunk/Makefile.xsh
===================================================================
--- trunk/Makefile.xsh	                        (rev 0)
+++ trunk/Makefile.xsh	2006-12-22 13:40:53 UTC (rev 1659)
@@ -0,0 +1,27 @@
+# This Makefile runs a shell providing a cross-compilation environment.
+# See http://www.dslinux.org/wiki/Porting_Howto
+
+ROOTDIR=$(PWD)
+PATH     := $(PATH):$(ROOTDIR)/tools
+UCLINUX_BUILD_USER=1
+
+ifneq ($(filter lib, $(MAKECMDGOALS)),)
+UCLINUX_BUILD_USER=0
+UCLINUX_BUILD_LIB=1
+endif
+
+include .config
+include config.arch
+
+.PHONY: xsh
+xsh:
+	@echo "Spawning cross-compilation shell. Happy hacking! :-)"
+	@echo "------ Environment: ----------------------------------------------------"
+	@echo "CC       =   $(CC)"
+	@echo "CFLAGS   =   $(CFLAGS)"
+	@echo "LD       =   $(LD)"
+	@echo "LDFLAGS  =   $(LDFLAGS)"
+	@echo "------------------------------------------------------------------------"
+	@(echo "$(PATH)" | grep toolchain) 2>&1 >/dev/null || \
+		echo "Remember to put the toolchain binaries in your PATH"
+	@env PS1=" -xsh- \w > " /bin/sh




More information about the dslinux-commit mailing list