title: how to compile dsplink application in android ndk to develop jni wrapper
body: <p>I have the dsplink application running on android omapl138 board.I can run the application in the terminal.
  I have included the dsplink application in ndk and tried to compile using following <code>Android.mk</code></p>
  
  <pre><code>LOCAL_PATH:= $(call my-dir)
  
  include $(CLEAR_VARS)
  
  LOCAL_LDLIBS += $(LOCAL_PATH)/dsplink.a
  
  LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\sys
  LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\usr
  LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\inc\sys\linux
  LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\src\api
  LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\internal
  LOCAL_C_INCLUDES += C:\dsplink_1_65_01_05_eng\dsplink\gpp\export\INCLUDE\Linux\OMAPL138\sys\arch
  
  LOCAL_MODULE    := libdsp-message
  LOCAL_SRC_FILES := message.c message_os.c
  
  include $(BUILD_SHARED_LIBRARY)
  </code></pre>
  
  <p>and while compiling, I get the following error</p>
  
  <pre><code>"Compile thumb : dsp-message &lt;= message.c
  
  "Compile thumb : dsp-message &lt;= message_os.c
  
  SharedLibrary  : libdsp-message.so
  
  C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `DRV_Initialize':
  _sync_usr.c:(.text+0xb10): undefined reference to `getpagesize' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `DRV_ProtectInit':
  **_sync_usr.c:(.text+0x24b4): undefined reference to `semget'**
  _sync_usr.c:(.text+0x24d4): undefined reference to `__errno_location'
  _sync_usr.c:(.text+0x24f4): undefined reference to `semget'
  _sync_usr.c:(.text+0x2538): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `DRV_ProtectExit':
  _sync_usr.c:(.text+0x25dc): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `DRV_ProtectEnter':
  _sync_usr.c:(.text+0x26b4): undefined reference to `semop'
  _sync_usr.c:(.text+0x26c4): undefined reference to `__errno_location' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `DRV_ProtectLeave':
  _sync_usr.c:(.text+0x2800): undefined reference to `semop' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `DRV_installCleanupRoutines':
  _sync_usr.c:(.text+0x2898): undefined reference to `sigemptyset'
  _sync_usr.c:(.text+0x28a4): undefined reference to `sigfillset' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `NOTIFY_eventWorker':
  _sync_usr.c:(.text+0x7ee4): undefined reference to `sigfillset' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `_SYNC_USR_init':
  _sync_usr.c:(.text+0x13ca8): undefined reference to `semget'
  _sync_usr.c:(.text+0x13d30): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `_SYNC_USR_exit':
  _sync_usr.c:(.text+0x13e34): undefined reference to `semget'
  _sync_usr.c:(.text+0x13e84): undefined reference to `semctl' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `_SYNC_USR_createCS':
  _sync_usr.c:(.text+0x14008): undefined reference to `semget'
  _sync_usr.c:(.text+0x14020): undefined reference to `__errno_location' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `_SYNC_USR_enterCS':
  _sync_usr.c:(.text+0x14358): undefined reference to `semop'
  _sync_usr.c:(.text+0x14368): undefined reference to `__errno_location' C:/NDK/android-ndk-r8/samples/two-libs//jni/dsplink.a(dsplink.o): In
  function `_SYNC_USR_leaveCS':
  _sync_usr.c:(.text+0x144a0): undefined reference to `semop' collect2: ld returned 1 exit status 
  
  make: ***
  [C:/NDK/android-ndk-r8/samples/two-libs//obj/local/armeabi/libdsp-message.so]
  Error 1
  </code></pre>