Consider the example of assembling a simple binary file with your favorite tar.

So, downloaded means NDK 18b2 from here https://developer.android.com/ndk/downloads/

Unpacked in /home/user/ndk18b

Download tar http://ftp.gnu.org/gnu/tar/tar-latest.tar.gz

Questions introductory:

  1. where to extract the tar source? In the folder with ndk?
  2. are there already any configure files needed or not?
  3. Do I need to create .mk files in articles? If so, how? (files there car)
  4. Is there any program to generate these .mk Files?

tar is usually collected in the terminal so

 ./configure CC=gcc LDFLAGS=-static 

Naturally, all binaries should be collected statically.

    1 answer 1

    1) Throw source code into your directory

    2) No clue

    3) It is necessary to create it with little hands, vi to help you :) okay kidding, any text editor will do

    4) In fact, you only need 2 mk of the Android.mk file - a list of what you are compiling + compiler flags and the second Application,mk - there will be nothing fatal if its content is like this:

     APP_OPTIM := debug //создается версия для отладки APP_ABI := all //создаются либы для всех архитектур 

    5) Next, run the build.sh which lies at the root of the NDK and pray :)

    PS NDK can build for many architectures: ARM, MIPS, x86, etc.

    • Is it possible to remake the makefile in Android.mk after configuration? Is there a normal editing manual? What is your catalog? Any? I am not writing a Java application under the bucket and sdk is not installed. I just need to build a binary from the source under the bucket. - blackeangel