title: Create Android.mk to build a C library
body: <p>I'm developping an app which needs to use a Java library (jpcap: <a href="http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/download.html" rel="nofollow">http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/download.html</a>). The problem is that library uses JNI to call methods written in C code.</p>
  
  <p>In order to call correctly the Java methods I have to compile the C code of the library using the Android NDK. To compile the C code I have to write an Android.mk file to use it with the ndk-build script which provides the NDK.</p>
  
  <p>I've never written before an Android.mk and I don't know how to write the file to fit my needs which are the next:</p>
  
  <p><strong>Compile the following source files:</strong></p>
  
  <p>JpcapCaptor.c
  JpcapSender.c
  JpcapWriter.c
  packet_arp.c
  packet_datalink.c
  packet_icmp.c
  packet_ip.c
  packet_ipv6.c
  packet_tcp.c
  packet_udp.c</p>
  
  <p><strong>Include the following libraries:</strong></p>
  
  <p>jni.h
  pcap.h</p>
  
  <p><strong>Link using the -lpcap option.</strong></p>
  
  <p>If any of you guys could tell me which lines do I have to write in the Android.mk file or tell me where to find a manual which explains this I would be very thankfull.</p>