clamav-devel February 2014 archive
Main Archive Page > Month Archives  > clamav-devel archives
clamav-devel: [Clamav-devel] Compiling for Android, where to sta

[Clamav-devel] Compiling for Android, where to start?

From: Rachmansyah Budi Setiawan <rachmansyahbs_at_nospam>
Date: Wed Feb 19 2014 - 03:09:40 GMT
To: clamav-devel@lists.clamav.net

Hello everyone,

I am trying to compile libclamav for Android. To my understanding, the best
way is to use compiler bundled in Android NDK tools. I am not that
proficient in C/C++ and reading config + Makefile, so I have almost no idea
on where to start. So far I am just dumping libclamav, libclamunrar,
libclamunrar_iface, and libltdl + target.h in a Java project and try to
build using ndk-build. This is how my Android.mk looks like:

-------------------------------------------------------------------------------------------------------------------------------
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := clamav
FILE_LIST := $(wildcard $(LOCAL_PATH)/libclamav/*.c) \
$(wildcard $(LOCAL_PATH)/libclamunrar/*.c) \
$(wildcard $(LOCAL_PATH)/libclamunrar_iface/*.c) \
$(wildcard $(LOCAL_PATH)/libltdl/*.c) \
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include \
$(LOCAL_PATH)/libclamav \
$(LOCAL_PATH)/libclamunrar \
$(LOCAL_PATH)/libclamunrar_iface \
$(LOCAL_PATH)/libltdl
include $(BUILD_STATIC_LIBRARY)
-------------------------------------------------------------------------------------------------------------------------------

Any help is appreciated. Thank you.
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net