1 #源文件路径, call My-dir calls the MY-DIR macro, returning the path to Android.mk2Local_path: = $ (Call my-dir)3 4 #生成so5 include $ (clear_vars)6Local_module: = First7Local_src_files: = Firstjni.CPP8 include $ (build_shared_library)9 Ten #使用第三方so One include $ (clear_vars) ALocal_src_files: = prebuilt/libbaidumapsdk_v3_2_0_15.so -Local_module: =baidumapsdk_v3_2_0_15 - include $ (prebuilt_shared_library) the - #生成可执行文件 - #CLEAR_VARS让编译系统清除掉一些已经定义过的宏, the definitions of these macros are global, - #当一个GNU make when compiling multiple modules, they must be purged and re-photographed. + include $ (clear_vars) - #LOCAL_ARM_MODE指定生成的原生程序所使用的ARM指令模式. + #arm表示使用32位的arm指令系统. ALocal_arm_mode: =Arm at #LOCAL_MODULE指定模块的名称, which is the file name after the native program was generated. - #这里最终将生成名为hello的文件, if it is a shared library, the libhello.so will be generated -Local_module: =Hello - #指定C或C + + source file list -Local_src_files: =hello.c - #指定生成的文件类型. in #BUILD_EXECUTABLE表示生成可执行文件, - #BUILD_SHARED表示生成动态库, to #BUILD_LIBRARY表示生成静态库 +Include $ (build_executable)
Note: If you use a third-party so file, third-party so should be placed in the prebuilt subdirectory of the directory where the Android.mk file is located
Attached: Quick copy version
Local_path: = $ (call my-dir) include $ (clear_vars) local_module := firstlocal_src_files: = Firstjni. CPP include $ (build_shared_library) include $ (clear_vars) local_src_files:= prebuilt/libbaidumapsdk_v3_2_0 _15.solocal_module := baidumapsdk_v3_2_0_15include $ (prebuilt_shared_library) include $ (clear_vars) Local_arm_mode := armlocal_module := hellolocal_src_files: = Hello.cinclude $ (build_executable)
ANDROID.MK parsing