Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8393293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:44:40+00:00 2026-06-09T19:44:40+00:00

Looks like it’s possible, but my script produces odd results: LOCAL_PATH:= $(call my-dir) include

  • 0

Looks like it’s possible, but my script produces odd results:

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

include $(LOCAL_PATH)/libos/Android.mk
include $(LOCAL_PATH)/libbase/Android.mk
include $(LOCAL_PATH)/utils/Android.mk

LOCAL_MODULE := native
include $(BUILD_SHARED_LIBRARY)

Only the first include is being parsed fine, other Android.mk files are being seacrhed at odd paths.
Suggestions?

Update: I have broken my building environment… It was OK in the office, but at home LOCAL_PATH:= $(call my-dir) defines LOCAL_PATH to NDK dir instead of project dir. This is my batch for building:

set BASHPATH=K:\cygwin\bin\bash
set PROJECTDIR=/cygdrive/h/Alex/Alex/Work/Android/remote-android
set NDKDIR=/cygdrive/h/Alex/Programming_Docs/Android/android-ndk-r6/ndk-build
set APP_BUILD_SCRIPT=/cygdrive/h/Alex/Alex/Work/Android/project/jni/Android.mk
set DEV_ROOT=h:/Alex/Alex/Work/Android/project

%BASHPATH% --login -c "cd %PROJECTDIR% && %NDKDIR%"

Update: I absolutely don’t understand how does this thing compose paths. I’m getting errors with paths like “/cygdrive/d/project/jni//cygdrive/d/Soft/project/jni/libos/src/libos.cpp’. This is after I decided to specify all files in the root Android.mk instead of including submodules.

Update 2: No luck, this doesn’t work either:

LOCAL_PATH:= $(call my-dir)
# Include makefiles here.
include $(LOCAL_PATH)/libos/Android.mk
include $(LOCAL_PATH)/libbase/Android.mk
include $(LOCAL_PATH)/utils/Android.mk

# Clear variables here.
 include $(CLEAR_VARS)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:44:41+00:00Added an answer on June 9, 2026 at 7:44 pm

    Pretty late here, but in case somebody reads this question, one way to get past the problem of broken paths(pointing to the ndk insted of your files from the jni) is to have in your jni folder:

    include $(call all-subdir-makefiles)
    

    and then in every subfolder of it (libos, libbase and ustils inthe case of OP) an Android.mk of this form:

    LOCAL_PATH := $(call my-dir)
    include $(CLEAR_VARS)
    LOCAL_C_INCLUDES        := $(LOCAL_PATH)
    LOCAL_MODULE            := utils
    LOCAL_SRC_FILES         := one.c
    LOCAL_SRC_FILES         += two.c
    

    where this second Android.mk in with the one.c and two.c files in a subfolder found in the jni folder.

    Note that trying something as

    LOCAL_PATH_BIS_WEIRD_OTHER_NAME := $(call my-dir)
    include $(CLEAR_VARS)
    LOCAL_C_INCLUDES        := $(LOCAL_PATH_OTHER_FUNKY_NAME)
    LOCAL_MODULE            := utils
    LOCAL_SRC_FILES         := one.c
    LOCAL_SRC_FILES         += two.c
    

    will lead again to a confused compiler looking for your source code where the ndk is.

    So, use the LOCAL_PATH := $(call my-dir) EXACTLY in this form in every subdirectory of the jni and include $(call all-subdir-makefiles) in the jni itself and you shouldn’t have problems.

    Hope this will help someone.

    Edit: this behaviour happens because what is kept in LOCAL_PATH is not deleted by include $(CLEAR_VARS).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looks like this question has been asked thousand times already, but each person's configuration
Looks like the options are Propel, Doctrine, and ActiveRecord, others?, but I am only
Looks like a dumb question, but I tried the following (where Me is a
Looks like I've missed something obvious but really can't figure out why I can't
Looks like linux doesnt implement pthread_suspend and continue, but I really need em. I
Looks like other people have had this issue, but I would like to understand
Looks like stupid question, but I just dont get it. My entity: public class
Looks like a stupid question. But comment to my answer to one of the
Looks like the following Ellipse in ControlTemplate does not get the BorderThickness, but why?
Looks like this question is popular, but there is no jQuery version. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.