Android.mk
# Copyright 2006 The Android Open Source Project
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES:= \
hello.c
LOCAL_SHARED_LIBRARIES := \
liblog \
libcutils \
libdl
# temporary hack for broken vendor rils
LOCAL_WHOLE_STATIC_LIBRARIES := \
librilutils_static
LOCAL_MODULE:= hello
include $(BUILD_EXECUTABLE)
hello.c
#include <stdio.h>
#include <stdlib.h>
#define cprintf(fmt,args...) do { \
FILE *fp = fopen ("/dev/console", "w"); \
if (fp) { \
fprintf(fp, fmt, ## args ); \
fclose(fp); \
} \
} while (0)
int main()
{
printf("hello world!\n");
return 0;
}