I answered my own question. Here is an example of a very simple makefile in case anyone else needs this info:
CC = (path to your cross compiler)/arm-none-linux-gnueabi-gcc
obj-m += my_module.o
all:
make -C /home/roy/imx31/kernel/linux-2.6.19 M=$(PWD) modules
The path in the "make" should be to the source tree of the kernel which is loaded onto the iMX31. This is the bit I was getting wrong, because it originally pointed to the source tree of the kernel running on the host PC. I'm still kicking myself!
Roy