There is an excellent tutorial by Nirnimesh on how to compile native programs for Android here http://android-tricks.blogspot.com/2009/02/hello-world-c-program-on-using-android.html
I have changed the script a little bit to address new path changes. The new script is available here http://android-cruft.googlecode.com/files/agcc-0.2.tgz.
Make sure to add this to your path
where AndroidNDK is your NDK installation directory.
Hope this works for you.