0

Androidでjniコードをコンパイルするためのmakeファイルを書いています。特定のフォルダーの下にあるすべての cpp ファイルを再帰的にコンパイルできるようにしたいと考えています。

どうやってやるの?ワイルドカード コマンドで遊んでみましたが、必要な結果が得られませんでした。

4

1 に答える 1

0

The Android make system has a gmake macro for handling this. Please see the documentation doc\ANDROID-MK.html in the NDK. Here is an extract:

all-subdir-makefiles
  Returns a list of Android.mk located in all sub-directories of
  the current 'my-dir' path. For example, consider the following
  hierarchy:

    sources/foo/Android.mk
    sources/foo/lib1/Android.mk
    sources/foo/lib2/Android.mk

  If sources/foo/Android.mk contains the single line:

    include $(call all-subdir-makefiles)

  Then it will include automatically sources/foo/lib1/Android.mk and
  sources/foo/lib2/Android.mk

  This function can be used to provide deep-nested source directory
  hierarchies to the build system. Note that by default, the NDK
  will only look for files in sources/*/Android.mk
于 2012-08-15T00:16:01.060 に答える