[android] Added build/debug configurations support. To use it:

- Go to project properties/C++ build
- Set additional parameter for ndk-build: NDK_DEBUG=1
- Go to "manage configurations" at the top left and rename active Default configuration to Debug
- Copy Debug configuration and rename it to Release
- Change ndk-build's parameter NDK_DEBUG=1 to NDK_DEBUG=0 in Release

Active configuration can be changed in the project's context menu
This commit is contained in:
Alex Zolotarev 2011-12-03 20:25:47 +03:00 committed by Alex Zolotarev
parent ca14e2d84b
commit b640e11f2c
2 changed files with 13 additions and 8 deletions

View file

@ -53,9 +53,12 @@ LOCAL_LDLIBS := -llog -lGLESv1_CM \
-lgeometry -lcoding -lbase -lexpat -lfreetype -lfribidi -lzlib -lbzip2 \
-ljansson -ltomcrypt -lprotobuf ./obj/local/armeabi/libstdc++.a
LOCAL_LDLIBS += -L../../omim-android-debug/out/debug
#LOCAL_LDLIBS += -L../../omim-android-release/out/release
LOCAL_LDLIBS += -Wl,--gc-sections
ifeq ($(NDK_DEBUG),1)
LOCAL_LDLIBS += -L../../omim-android-debug/out/debug
else
LOCAL_LDLIBS += -L../../omim-android-release/out/release
endif
include $(BUILD_SHARED_LIBRARY)

View file

@ -3,8 +3,10 @@ APP_ABI := armeabi
APP_STL := gnustl_static
APP_CFLAGS += -I../3party/boost
# comment/uncomment this to enable release build
APP_OPTIM := debug
APP_CFLAGS += -DDEBUG -D_DEBUG
#APP_OPTIM := release
#APP_CFLAGS += -DRELEASE -D_RELEASE
ifeq ($(NDK_DEBUG),1)
APP_OPTIM := debug
APP_CFLAGS += -DDEBUG -D_DEBUG
else
APP_OPTIM := release
APP_CFLAGS += -DRELEASE -D_RELEASE
endif