开发者

how to run a shell command at the END of the Android.mk build process?

开发者 https://www.devze.com 2023-02-28 00:26 出处:网络
I am trying to copy a file from libs/arm/eabi in to res/raw at the end of the NDK build process using Android.mk

I am trying to copy a file from libs/arm/eabi in to res/raw at the end of the NDK build process using Android.mk

From some searching, I found that you can run a shell command to copy the file, like this:

$(shell c开发者_Python百科p $(LOCAL_PATH)/../../libs/armeabi/pcapd res/raw)

However, even if I put this at the end of my top-most Android.mk, it always tries to run this command first. How can I get it to run this after the build completes?


You can add to your Android.mk before #include $(BUILD_EXECUTABLE):

LOCAL_POST_INSTALL_CMD := \
         cp $(LOCAL_PATH)/../../libs/armeabi/pcapd res/raw


Write a makefile that calls ndk-build and then your shell line. Build your project by executing make

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号