Just reading through my posts, it isn't soo clear what I am doing is
it! :o)
/path/to/top/level/projects/directory/Application.mak
APP_MODULES := pigame
APP_PROJECT_PATH := $(call my-dir)/PiGame/Android
/path/to/top/level/projects/directory/PiGame/Android/jni/Android.mk
LOCAL_PATH := $(call my-dir)
ENGINE_PATH := ../../../PiEngine
GAME_PATH := ../../../PiGame
THIRDPARTY_PATH := ../../../ThirdParty
include $(CLEAR_VARS)
STLPORT_BASE := $(NDK_WRAPPERS_BASE)/stlport
LOCAL_MODULE := pigame
LOCAL_CFLAGS += -I$(STLPORT_BASE)/stlport \
-I$(LOCAL_PATH)/../../../PiEngine/Base \
-I$(LOCAL_PATH)/SharedEngine \
-D__NEW__ \
-D__SGI_STL_INTERNAL_PAIR_H \
-DANDROID \
-D_ANDROID \
-DOS_ANDROID \
-DANDROID_NDK \
-DDISABLE_IMPORTGL \
-DTCHAR=char \
-I$(NDK_DIR)/build/platforms/android-4/arch-arm/usr/include
...and so on! And in my Android NDK folder, inside apps I have a
symlink called 'PiGame' that goes to:
/path/to/top/level/projects/directory
It isn't ideal, as it means I can only build one project from the
projects directory. I will have another play with it with your ideas
below and see if I can get any better. I think the essential problem I
have, is I tried to symlink my actual android directory (with the
source code a couple of directories higher), and then in the makefile
I used $(realpath .) to get the real path of the symlinked directory,
from there I was able to include all my source files, but the android
makefile system tried to include my real paths concatenated to the
android app directory - oops!
As I said, I will have another play!
Steve
On Oct 10, 4:21 pm, Jack Palevich <
jack...@google.com> wrote:
> The way I avoided the problem you've encountered is to use a relative path
> in the $NDK/app/myapp/Application.mk file.
>
> That is, from your description it sounds like you're doing:
>
> $NDK/app/yourapp/Application.mk:
> APP_MODULES := yourapp
> APP_PROJECT_PATH := $(call my-dir)/project
>
> And then you've got a symbolic link from $NDK/app/yourapp/project to your
> real project. directory
>
> What I did was:
>
> $NDK/app/myapp/Application.mk:
> APP_MODULES := myapp
> APP_PROJECT_PATH := $(call my-dir)/../../../my-real-project-dir
>
> Where the ../../../my-real-project-dir was the relative path from
> $NDK/app/myapp to where my project sources were kept.
>
> It seemed to work. Maybe you could do that as well. (I only tried this on
> Linux and OSX, I don't have a cygwin installation handy.)
>