title: include libjpeg in a NDK build
body: <p>As specified in <a href="https://stackoverflow.com/questions/12294709/how-to-build-libjpeg-for-ndk-use">this answer</a>, I downloaded libjpeg 8d from github and placed it in a folder <code>{ANDROID_APP}/jni/libjpeg</code>. This library has it's own <code>Android.mk</code>, so I tried to include it at the end of my <code>{ANDROID_APP}/jni/Android.mk</code> this way :</p>
  
  <p><code>include $(LOCAL_PATH)/libjpeg/Android.mk</code></p>
  
  <p>Note : I'm using the latest version of android NDK (r8c)</p>
  
  <p>After running ndk-build, I still get this error :</p>
  
  <p><code>ANDROID_APP/jni/libfoo/foo_analysis.c:36:21: fatal error: jpeglib.h: No such file or directory</code></p>
  
  <p>This is the structure of my global <code>Android.mk</code> :</p>
  
  <pre><code>LOCAL_PATH := $(call my-dir)
  
  # libFoo
  include $(CLEAR_VARS) 
  
  LOCAL_MODULE := libfoo
  LOCAL_MODULE_FILENAME := libfoo
  LOCAL_SRC_FILES := libfoo/foo.c libfoo/foo_analysis.c libfoo/foo_extract.c
  
  LOCAL_STATIC_LIBRARIES := libbmp # declared previously but not shown in this example
  
  LOCAL_CFLAGS   = ${FLAGS}
  LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/libfoo
  LOCAL_EXPORT_LDLIBS := -llog
  
  include $(BUILD_STATIC_LIBRARY)
  
  # libBar
  include $(CLEAR_VARS)
  
  LOCAL_MODULE := libbar
  LOCAL_MODULE_FILENAME := libbar
  LOCAL_SRC_FILES := bar/bar.c
  
  LOCAL_STATIC_LIBRARIES := libfoo
  
  LOCAL_CFLAGS   = ${FLAGS}
  LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/bar
  LOCAL_EXPORT_LDLIBS := -llog
  
  include $(BUILD_STATIC_LIBRARY)
  
  # callbar
  LOCAL_MODULE := libcallbar
  LOCAL_MODULE_FILENAME := libcallbar
  LOCAL_SRC_FILES := com_androidapp_nativeC_callbar.c
  
  LOCAL_STATIC_LIBRARIES := libbar
  
  LOCAL_CFLAGS   = ${FLAGS}
  
  include $(BUILD_SHARED_LIBRARY)
  
  #libjpeg
  include $(LOCAL_PATH)/libjpeg/Android.mk
  </code></pre>
  
  <p>I tried to use <code>LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/libfoo $(LOCAL_PATH)/libjpeg</code>
  and <code>LOCAL_C_INCLUDES := $(LOCAL_PATH)/libjpeg</code> in the libFoo module, but I still get the same error.</p>