3

This question look duplicate to make *** no targets specified and no makefile found. stop but my problem is slightly different and I tried that solution also but not work for me.
I'm working on OpenCV library and I start with sample project but this gives the following error to me. Please help me to solve this error.

17:31:25 **** Auto Build of configuration Default for project MyFirstOpenCVJNI ****
make 
make: *** No targets specified and no makefile found.  Stop.

17:31:25 Build Finished (took 122ms)

following is my Android.mk file
//Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

OPENCV_LIB_TYPE:=STATIC
OPENCV_INSTALL_MODULES:=on

include ../includeOpenCV.mk
include $(OPENCV_MK_PATH)

LOCAL_MODULE    := first-opencvjni
LOCAL_SRC_FILES := first-opencvjni.cpp
LOCAL_LDLIBS +=  -llog -ldl

include $(BUILD_SHARED_LIBRARY)
Community
  • 1
  • 1
Samadhan Medge
  • 2,049
  • 2
  • 16
  • 24

2 Answers2

8

After many searches I solved the error, right click on project->Properties->C/C++ Build(left side)->Builder Settings->uncheck the "Use default build command" checkbox->enter "${NDKROOT}/ndk-build.cmd" in Build command checkbox on windows OS, see the following image enter image description here

before doing all thing you need to set the NDKROOT Environment variable in Environment settings to the root folder to your ndk directory in my case it is C:\adt-bundle-windows-x86-20130522\android-ndk-r8e.
If any difficulties or queries let me know.

Samadhan Medge
  • 2,049
  • 2
  • 16
  • 24
1

make by default will execute file named makefile or Makefile in your case the makefile name is Android.mk so instead of executing make as $~ make execute it as

$~ make -f Android.mk

even i would like to know who is executing the makefile? Are you manually executing or its written in some script? If written in script try to change the make command to make -f Android.mk else if you can't change the script ( May be because of some reasons ) then rename your Android.mk to makefile and check it.

Sagar Sakre
  • 2,336
  • 22
  • 31