I would like to cross-compile this application for my Asus RT-N16. I would like to compile it under Ubuntu 9.

First question I have - may I use tool chain used for wl500g?

I've downloaded sources to /tmp/harimini. Sources come with 2 files - Makefile and build-arm.sh. First one has the following text:
Code:
# export CROSS=/stuff/tmp/work/armv4t-angstrom-linux-gnueabi/gcc-cross-4.2.4-r5/staging-pkg/cross/bin/arm-angstrom-linux-gnueabi-
# export CPPFLAGS=-I/stuff/tmp/staging/armv4t-angstrom-linux-gnueabi/usr/include/mysql/
# export CPPFLAGS=-I/usr/include/libxml2/
export CPPFLAGS=-DUSE_MYSQL_WRAPPER -I/usr/include/libxml2/ -I/usr/include/mysql
# export CPPFLAGS=-DUSE_MYSQL_WRAPPER -I/stuff/tmp/work/armv4t-angstrom-linux-gnueabi/libxml2-2.7.2-r0/staging-pkg/staging/armv4t-angstrom-linux-gnueabi/usr/include/libxml2
# export CXXFLAGS=-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -Wcast-align
# export CFLAGS=-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t -Wcast-align 
# export LDFLAGS=-L/stuff/tmp/staging/armv4t-angstrom-linux-gnueabi/usr/lib/mysql/
# export CC=${CROSS}gcc ${CFLAGS}
#export LD=${CROSS}ld
# export CXX=${CROSS}g++ ${CXXFLAGS}

LIBRARIES=RA SerializeClass PlutoUtils DCE pluto_main lmce_datalog
APPS=DCERouter MessageSend sqlCVS mysql_wrapper CreateDevice
DCEDEVS=ZWave AEt_EMC2000 Tongdy_RS485 # EnOcean_TCM120 
PLUGINS=RPC_Plugin Lighting_Plugin DataLogger_Plugin
CONFLICTING=

all: libs nolibs

nolibs: plugins apps

apps: required_dirs dcedevs intersecting
	for i in $(APPS); do $(MAKE) -C $$i || exit $$?; done

dcedevs: required_dirs
	for i in $(DCEDEVS); do $(MAKE) -C $$i bin || exit $$?; done

libs: required_dirs
	for i in $(LIBRARIES); do $(MAKE) -C $$i || exit $$?; done

plugins: required_dirs
	for i in $(PLUGINS); do $(MAKE) -C $$i so || exit $$?; done

intersecting: required_dirs
	for i in $(CONFLICTING); do $(MAKE) -C $$i clean all || exit $$?; done

required_dirs:
	mkdir -p bin lib 2>/dev/null

# you have to request yourself; there's no target depending on it
packages: all
	@echo "** Expect lots of editing to do :) Press enter to start"
	read
	for i in $(APPS) $(DCEDEVS) $(PLUGINS) $(CONFLICTING); do $(MAKE) -C $$i package; done

clean:
	@#for i in $(STANDALONE) $(PLUGINS) $(CONFLICTING); do $(MAKE) -C $$i clean || exit $$?; done
	for i in '*.d' '*.d.*' '*.o'; do find -type f -name "$$i" -exec rm '{}' ';' ; done

.PHONY: clean all
and the second one:
Code:
#!/bin/bash
# make clean
CROSS=/stuff/tmp/work/armv4t-angstrom-linux-gnueabi/gcc-cross-4.2.4-r5/staging-pkg/cross/bin/arm-angstrom-linux-gnueabi- CPPFLAGS=-I/stuff/tmp/staging/armv4t-angstrom-linux-gnueabi/usr/include/mysql/ CXXFLAGS="-msoft-float -D__GCC_FLOAT_NOT_NEEDED -march=armv4 -mtune=arm920t" make
Sources are without configure file.

What should I change and where to compile this for rt-n16?

Also, according to that software developer toolchain should include headers/libs for mysql, libattr and libxml2. Where can I take it?