Index: /trunk/wifidog/README.openwrt
===================================================================
--- /trunk/wifidog/README.openwrt	(revision 142)
+++ /trunk/wifidog/README.openwrt	(revision 142)
@@ -0,0 +1,24 @@
+OpenWRT specific README
+
+$Header$
+
+In order to compile OpenWRT for the linksys WRT54G, you must first
+obtain and install the OpenWRT build environement from thw OpenWRT
+project: http://openwrt.ksilebo.net/
+
+Once you have successfully built a full toolchain according to the
+instructions for OpwnWRT, you can compile binaries for the MIPS_EL
+platform.
+
+For WiFiDog, you must do:
+
+$ ./autogen.sh BUILDROOT=$HOME/buildroot
+$ make
+
+This example assumes that you have installed the OpenWRT buildroot
+in your home directory. You must run autogen.sh from the directory
+containing the WiFiDog root. You might need to give autogen.sh the
+execute permission.
+
+Details on how to build an ipkg and how to install all the modules
+that WiFiDog requires will be added here in the near future.
Index: /trunk/wifidog/autogen.sh
===================================================================
--- /trunk/wifidog/autogen.sh	(revision 11)
+++ /trunk/wifidog/autogen.sh	(revision 142)
@@ -1,7 +1,40 @@
 #!/bin/sh
 # Run this to generate all the initial makefiles, etc.
+#
+# $Header$
+
+if [ -r Makefile ]
+then
+	echo "Doing distclean"
+	make distclean
+fi
+
+if [ "X$1" != "X" ]
+then
+	BUILDROOT=`echo "$1" | sed 's/^[^=]*[=]//'`
+
+	OLDCC=${CC}
+	OLDRANLIB=${RANLIB}
+	OLDAR=${AR}
+
+	CC=${BUILDROOT}/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-gcc
+	RANLIB=${BUILDROOT}/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-ranlib
+	AR=${BUILDROOT}/build_mipsel/staging_dir/bin/mipsel-linux-uclibc-ar
+
+	POSTCONF=--host=mipsel
+
+	export CC
+	export RANLIB
+	export AR
+else
+	OLDCC=${CC}
+	OLDRANLIB=${RANLIB}
+	OLDAR=${AR}
+	POSTCONF=
+fi
 
 echo "Running mkdir -p config"
 mkdir -p config
+
 if [ "X"`uname` = "XDarwin" ]
 then
@@ -12,4 +45,5 @@
 	libtoolize --force
 fi
+
 echo "Running aclocal"
 aclocal
@@ -20,4 +54,12 @@
 echo "Running autoconf"
 autoconf
-echo "Running ./configure --enable-maintainer-mode  $conf_flags $@"
-./configure --enable-maintainer-mode $conf_flags "$@"
+echo "Running ./configure ${POSTCONF} --enable-maintainer-mode  $conf_flags $@"
+./configure ${POSTCONF} --enable-maintainer-mode $conf_flags "$@"
+
+CC=${OLDCC}
+RANLIB=${OLDRANLIB}
+AR=${OLDAR}
+
+export CC
+export RANLIB
+export AR
