To build a console application for Android, you'll need NDK. Android has its special libc version called bionic, that's why you need NDK anyway.
After downloading and extracting NDK, you'll find a samples folder there. Take a look at hello-jni example and create your own. Below an example for Android.mk file:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := hello-jni
LOCAL_SRC_FILES := hello-jni.c
include $(BUILD_SHARED_LIBRARY)