GNU make-find sources from parent directories with a pattern

I will ask this question again with a twist:

How to specify a lookup pattern when files are in the parent directory LOCAL_PATH?

let's say the files will be ../../src/foo.cppand ../../src/bar.cpp.

code LOCAL_SRC_FILES := $(wildcard ../../src/*.cpp)assigns an empty string.

+3
source share
1 answer

I found a solution, but I'm not quite sure what the problem is.

Old script:

LOCAL_PATH := $(call my-dir)
LOCAL_SRC_FILES := $(wildcard ../../src/*.cpp)

New script that works:

LOCAL_PATH := $(call my-dir)/..
LOCAL_SRC_FILES := $(wildcard ../src/*.cpp)

I think my-dir and wildcard are not in the same working directory.

Android ndk toolchain make (android.mk) /jni. $(call my-dir), , /jni ( , make). $(wildcard ) .

, , , , .

EDIT: script, ( , , )

LOCAL_PATH := $(call my-dir)
LOCAL_SRC_FILES := ../../src/foo.cpp \
../../src/bar.cpp
+2

All Articles