diff --git a/pythonforandroid/bootstraps/pygame/build/jni/application/Android.mk b/pythonforandroid/bootstraps/pygame/build/jni/application/Android.mk index e30f708b7f..dcf8d643f9 100644 --- a/pythonforandroid/bootstraps/pygame/build/jni/application/Android.mk +++ b/pythonforandroid/bootstraps/pygame/build/jni/application/Android.mk @@ -18,7 +18,7 @@ LOCAL_CFLAGS := $(foreach D, $(APP_SUBDIRS), -I$(LOCAL_PATH)/$(D)) \ -I$(LOCAL_PATH)/../jpeg \ -I$(LOCAL_PATH)/../intl \ -I$(LOCAL_PATH)/.. \ - -I$(LOCAL_PATH)/../../../../other_builds/$(MK_PYTHON_INCLUDE_ROOT) + -I$(PYTHON_INCLUDE_ROOT) LOCAL_CFLAGS += $(APPLICATION_ADDITIONAL_CFLAGS) @@ -38,7 +38,7 @@ LOCAL_LDLIBS := -lpython2.7 -lGLESv1_CM -ldl -llog -lz # AND: Another hardcoded path that should be templated # AND: NOT TEMPALTED! We can use $ARCH -LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../../other_builds/$(MK_PYTHON_LINK_ROOT) $(APPLICATION_ADDITIONAL_LDFLAGS) +LOCAL_LDFLAGS += -L$(PYTHON_LINK_ROOT) $(APPLICATION_ADDITIONAL_LDFLAGS) LIBS_WITH_LONG_SYMBOLS := $(strip $(shell \ for f in $(LOCAL_PATH)/../../libs/$ARCH/*.so ; do \ diff --git a/pythonforandroid/bootstraps/service_only/build/jni/application/src/Android.mk b/pythonforandroid/bootstraps/service_only/build/jni/application/src/Android.mk index 6a8f1a65a2..0bc42bfb89 100644 --- a/pythonforandroid/bootstraps/service_only/build/jni/application/src/Android.mk +++ b/pythonforandroid/bootstraps/service_only/build/jni/application/src/Android.mk @@ -7,13 +7,13 @@ LOCAL_MODULE := main # Add your application source files here... LOCAL_SRC_FILES := start.c pyjniusjni.c -LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../../other_builds/$(MK_PYTHON_INCLUDE_ROOT) $(EXTRA_CFLAGS) +LOCAL_CFLAGS += -I$(PYTHON_INCLUDE_ROOT) $(EXTRA_CFLAGS) LOCAL_SHARED_LIBRARIES := python_shared LOCAL_LDLIBS := -llog $(EXTRA_LDLIBS) -LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../../../other_builds/$(MK_PYTHON_LINK_ROOT) $(APPLICATION_ADDITIONAL_LDFLAGS) +LOCAL_LDFLAGS += -L$(PYTHON_LINK_ROOT) $(APPLICATION_ADDITIONAL_LDFLAGS) include $(BUILD_SHARED_LIBRARY) diff --git a/pythonforandroid/bootstraps/webview/build/jni/application/src/Android.mk b/pythonforandroid/bootstraps/webview/build/jni/application/src/Android.mk index b1403ec110..20399573c9 100644 --- a/pythonforandroid/bootstraps/webview/build/jni/application/src/Android.mk +++ b/pythonforandroid/bootstraps/webview/build/jni/application/src/Android.mk @@ -9,13 +9,13 @@ LOCAL_MODULE := main # Add your application source files here... LOCAL_SRC_FILES := start.c pyjniusjni.c -LOCAL_CFLAGS += -I$(LOCAL_PATH)/../../../../../other_builds/$(MK_PYTHON_INCLUDE_ROOT) $(EXTRA_CFLAGS) +LOCAL_CFLAGS += -I$(PYTHON_INCLUDE_ROOT) $(EXTRA_CFLAGS) LOCAL_SHARED_LIBRARIES := python_shared LOCAL_LDLIBS := -llog $(EXTRA_LDLIBS) -LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../../../other_builds/$(MK_PYTHON_LINK_ROOT) $(APPLICATION_ADDITIONAL_LDFLAGS) +LOCAL_LDFLAGS += -L$(PYTHON_LINK_ROOT) $(APPLICATION_ADDITIONAL_LDFLAGS) include $(BUILD_SHARED_LIBRARY) diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py index f2a3e4c64a..b43ba9b88d 100644 --- a/pythonforandroid/recipe.py +++ b/pythonforandroid/recipe.py @@ -626,9 +626,7 @@ class BootstrapNDKRecipe(Recipe): :class:`~pythonforandroid.recipe.NDKRecipe`. To link with python, call the method :meth:`get_recipe_env` - with the kwarg *with_python=True*. If recipe contains android's mk files - which should be linked with python, you may want to use the env variables - MK_PYTHON_INCLUDE_ROOT and MK_PYTHON_LINK_ROOT set in there. + with the kwarg *with_python=True*. ''' dir_name = None # The name of the recipe build folder in the jni dir @@ -657,16 +655,6 @@ def get_recipe_env(self, arch=None, with_flags_in_cc=True, with_python=False): self.ctx.python_recipe.major_minor_version_string) if 'python3' in self.ctx.python_recipe.name: env['EXTRA_LDLIBS'] += 'm' - - # set some env variables that may be needed to build some bootstrap ndk - # recipes that needs linking with our python via mk files, like - # recipes: sdl2, genericndkbuild or sdl - other_builds = join(self.ctx.build_dir, 'other_builds') + '/' - env['MK_PYTHON_INCLUDE_ROOT'] = \ - self.ctx.python_recipe.include_root(arch.arch)[ - len(other_builds):] - env['MK_PYTHON_LINK_ROOT'] = \ - self.ctx.python_recipe.link_root(arch.arch)[len(other_builds):] return env