title: How do i include a common module in 2 different applications(Android)
body: <p>I need a little help with Android makefiles.</p>
  
  <p>There is one common module for 2 of my applications. I planned to have a makefile for common module<code>common.mk</code> and include it in both my applications.</p>
  
  <p>Like this:</p>
  
  <pre><code>app1:
  =====
  main.c
  Android.mk
    ...
    ...
    include ../common/common.mk
    LOCAL_MODULE := app1
    ...
    ...
  
  app2:
  =====
  main.c
  Android.mk
    ...
    ...
    include ../common/common.mk
    LOCAL_MODULE := app2
    ...
    ...
  
  common:
  =======
  common.mk
  common.c
  </code></pre>
  
  <p>when I build from root directory using <code>make app2</code>, I am receiving multiple definition errors for all the functions that are apart of common module.</p>
  
  <p>I came to a conclusion that the common.mk is getting included twice while the Android build system is searching for the right target(app2 in my case). Which is why the problem is occurring.</p>
  
  <p>Now how do I control this? What is the standard way in Android?</p>