Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set GNUMAKE variable for ndk-build to work

I am trying to make ndk-build to work within Cygwin on windows. As per the NDK documentation (specifically INSTALL.htm), "The NDK requires GNU Make 3.81 or later being available on your development."

I have Gnu Make installed on my computer.

So far, so good.

Within Cygwin bash, I cd over to the android NDK root directory. Now when I type in the following command (without parameters right now, just to see if the command works):

$./ndk-build
ERROR: Cannot find 'make' program. Please install Cygwin make package or define the GNUMAKE variable to point to it.

So I try to set the GNUMAKE variable, but no luck:

$export GNUMAKE='/cygdrive/c\Program Files\GnuWin32\bin'
ERROR: Your GNUMAKE variable is defined to an invalid name: /cygdrive/c\Program Files\GnuWin32\bin Please fix it to point to a valid make executable (e.g. usr/bin/make)

I even tried setting it to usr/bin/make as it suggests, but same invalid name error.

Anyone, knows how to resolve this?

I'm using Windows 7, NDK r5, Cygwin 1.7.1

like image 645
OceanBlue Avatar asked Jan 26 '11 15:01

OceanBlue


People also ask

Where can I find NDK build?

Right click on your project , Go to Build Path->Select Configure Build Path -> Select C/C++ Build->Select Builder Setting Tab ->In Builder Setting set your ndk-build path i.e C:\android-ndk-r8e\ndk-build .

What is Ndk_project_path?

NDK_PROJECT_PATH - the location of your project NDK_APPLICATION_MK - the path of the Application.mk file APP_BUILD_SCRIPT - the path to the Android.mk file. These are needed to override the default values of the build script, which expects things to be in the jni folder.

What is an NDK build?

The Native Development Kit (NDK) is a set of tools that allows you to use C and C++ code with Android and provides platform libraries you can use to manage native activities.


2 Answers

I had an issue with GNUMake when putting the ndk in a folder with a space in it (I originally put it in the program files directory). I moved everything to C:/android/android-ndk and C:/android/android-sdk and updated my path settings to include these directories.

like image 175
Matt Esch Avatar answered Oct 07 '22 21:10

Matt Esch


Its not problem with the make but installing cygwin in ndk-demo script the make path is found using which command mostly which command installation is missing in cygwin.

Solution: Relaunch your cygwin installation select utils (install )

Checking: $ which make should give you the make command path on cygwin prompt.

Regards, Vasu

like image 45
Vasu Avatar answered Oct 07 '22 21:10

Vasu