android:android-mk
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
android:android-mk [2010/11/10 09:35] – created percy | android:android-mk [2016/05/05 13:07] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== NDK-provided function macros: ===== | ===== NDK-provided function macros: ===== | ||
这里定义了一些宏命令,使用方法: | 这里定义了一些宏命令,使用方法: | ||
- | | + | < |
- | + | $(call < | |
+ | </ | ||
* my-dir | * my-dir | ||
返回当前Android.mk目录路径 | 返回当前Android.mk目录路径 | ||
* all-subdir-makefiles | * all-subdir-makefiles | ||
返回当前目录下(my-dir),及子目录下的Android.mk文件列表。 | 返回当前目录下(my-dir),及子目录下的Android.mk文件列表。 | ||
+ | * this-makefile | ||
+ | 返回当前Makefile文件路径。 | ||
+ | * parent-makefile | ||
+ | Returns the path of the current Makefile (i.e. where the function is called) | ||
+ | * parent-makefile | ||
+ | Returns the path of the parent Makefile in the inclusion tree, i.e. the path of the Makefile that included the current one. | ||
+ | Unordered List Item | ||
+ | * grand-parent-makefile | ||
+ | Guess what.. | ||
+ | | ||
+ | ===== Module-description variables ===== | ||
+ | 定义一些变量,这些变量应该写在' | ||
+ | * LOCAL_PATH | ||
+ | 提示当前文件的路径,必须定义在文件开头 | ||
+ | LOCAL_PATH := $(call my-dir) | ||
+ | 这个变量不会被$(CLEAR_VARS)清空,所以每个Android.mk都需要定义一次这个变量,就算你定义了几个module, | ||
+ | |||
+ | * LOCAL_MODULE | ||
+ | 这是你定义的模块名字,名字必须唯一,且不能含有空格,必须定义在$(BUILD_XXXX)前面. | ||
+ | * LOCAL_SRC_FILES | ||
+ | src文件列表,路径是相对于LOCAL_PATH | ||
+ | * LOCAL_CPP_EXTENSION | ||
+ | 可选变量用来定义C++文件后缀,' | ||
+ | < | ||
+ | LOCAL_CPP_EXTENTION := .cxx | ||
+ | </ | ||
+ | * LOCAL_C_INCLUDES | ||
+ | An optional list of paths, relative to the NDK *root* directory, which will be appended to the include search path when compiling | ||
+ | LOCAL_C_INCLUDES := sources/foo | ||
+ | Or even: | ||
+ | LOCAL_C_INCLUDES := $(LOCAL_PATH)/ | ||
+ | These are placed before any corresponding inclusion flag in LOCAL_CFLAGS / LOCAL_CPPFLAG | ||
+ | * LOCAL_CFLAGS | ||
+ | * LOCAL_CXXFLAGS | ||
+ | * LOCAL_CPPFLAGS | ||
+ | * LOCAL_STATIC_LIBRARIES | ||
+ | 静态库模块列表(用BUILD_STATIC_LIBRARY生成的),用来链接到当前模块,只在动态共享库中会用到。 | ||
+ | * LOCAL_SHARED_LIBRARIE | ||
+ | 运行是需要的,链接时需要的,还是看原来的说明吧, | ||
+ | < | ||
+ | The list of shared libraries *modules* this module depends on at runtime. | ||
+ | This is necessary at link time and to embed the corresponding information | ||
+ | in the generated file. | ||
+ | |||
+ | Note that this does not append the listed modules to the build graph, | ||
+ | i.e. you should still add them to your application' | ||
+ | in your Application.m | ||
+ | </ | ||
+ | |||
+ | |||
/var/www/dokuwiki/wiki/data/attic/android/android-mk.1289352910.txt.gz · Last modified: 2016/05/05 13:06 (external edit)