Android external 目录下新增一个可执行应用及编译
Signed-off-by: ithink.chan <chenyang@autoai.com>
This commit is contained in:
parent
3b68d3794c
commit
2eddd7da49
|
@ -0,0 +1,29 @@
|
|||
# [Android external 目录下新增一个可执行应用及编译](https://blog.csdn.net/loongembedded/article/details/76538470)
|
||||
|
||||
新增的应用为 test 文件夹,此文件夹下包含 Android.mk 和 test.cpp 文件,Android.mk 内容如下:
|
||||
|
||||
```sh
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := study.cpp
|
||||
|
||||
LOCAL_MODULE := study
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
```
|
||||
|
||||
TARGET_OUT_EXECUTABLES 对应 out 目录下的,比如 out\target\product\msm8937_64\system\bin
|
||||
|
||||
截止上面的修改,用 mmm external/study 可以编译生成 study 可执行文件到 out\target\product\msm8937_64\system\bin,但是整个系统编译的时候不会生成。为了在在整个系统编译的时候(比如make -j16)能够生成,还需要修改 device\qcom\common\base.mk,增加
|
||||
|
||||
PRODUCT_PACKAGES += study
|
||||
|
||||
相关链接:
|
||||
|
||||
[Android源码开发之添加/删除系统应用](http://blog.csdn.net/zrf1335348191/article/details/54907228)
|
Loading…
Reference in New Issue