I am trying to compile 2 shared libraries in the same mk file. The second one depends on the first.
I cannot succeed to link both, the second lib cannot see the .h of the first.
I can put them in LOCAL_C_INCLUDES, but I want to split the Android.mk after making it work, and I cannot make hard references like this. I find LOCAL_EXPORT_C_INCUDES that seems to do exactly what I want… except that it do not work.
Here is my code
—————————————————————————–
First library
include $(CLEAR_VARS)
LOCAL_MODULE := libFirst
LOCAL_PATH_ORIG := $(LOCAL_PATH)
LOCAL_PATH := /the/path/to/my/first/sources
LOCAL_SRC_FILES = $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/**/*.c))
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_CFLAGS := -g -O2
include $(BUILT_SHARED_LIBRARY)
LOCAL_PATH := $(LOCAL_PATH_ORIG)
—————————————————————————–
Second library
include $(CLEAR_VARS)
LOCAL_MODULE := libSecond
LOCAL_PATH_ORIG := $(LOCAL_PATH)
LOCAL_PATH := /the/path/to/my/second/sources
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/**/*.cpp))
LOCAL_C_INCLUDES := $(wildcard $(LOCAL_PATH)/**)
LOCAL_LDLIBS := -lGLESv2 -llibFirst
LOCAL_SHARED_LIBRARIES := libFirst
include $(BUILD_SHARED_LIBRARY)
LOCAL_PATH := $(LOCAL_PATH_ORIG)
Any ideas ?
the problem was this line:
A made a typo, it’s
…