Added filtering out subdirs from build in ChangeAppSettings.sh

This commit is contained in:
pelya
2010-09-10 14:56:46 +03:00
parent 62a82ec84d
commit f7945552e7
5 changed files with 20 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
CHANGE_APP_SETTINGS_VERSION=6
CHANGE_APP_SETTINGS_VERSION=7
AUTO=
if [ "X$1" = "X-a" ]; then
@@ -163,6 +163,12 @@ if [ -n "$var" ] ; then
AppLdflags="$var"
fi
echo -n "\nBuild only following subdirs (empty will build all dirs) ($AppSubdirsBuild): "
read var
if [ -n "$var" ] ; then
AppSubdirsBuild="$var"
fi
echo -n "\nHere you may type some short readme text that will be shown when app data is downloaded."
echo -n "\nCurrent text:\n"
echo -n "`echo $ReadmeText | tr '^' '\\n'`"
@@ -208,6 +214,7 @@ echo AppVersionName=\"$AppVersionName\" >> AndroidAppSettings.cfg
echo CompiledLibraries=\"$CompiledLibraries\" >> AndroidAppSettings.cfg
echo AppCflags=\'$AppCflags\' >> AndroidAppSettings.cfg
echo AppLdflags=\'$AppLdflags\' >> AndroidAppSettings.cfg
echo AppSubdirsBuild=\'$AppSubdirsBuild\' >> AndroidAppSettings.cfg
echo ReadmeText=\'$ReadmeText\' >> AndroidAppSettings.cfg
AppShortName=`echo $AppName | sed 's/ //g'`
@@ -323,7 +330,8 @@ cat project/jni/Android.mk | \
sed "s^COMPILED_LIBRARIES := .*^COMPILED_LIBRARIES := $CompiledLibraries^" | \
sed "s^APPLICATION_ADDITIONAL_CFLAGS :=.*^APPLICATION_ADDITIONAL_CFLAGS := $AppCflags^" | \
sed "s^APPLICATION_ADDITIONAL_LDFLAGS :=.*^APPLICATION_ADDITIONAL_LDFLAGS := $AppLdflags^" | \
sed "s^SDL_ADDITIONAL_CFLAGS :=.*^SDL_ADDITIONAL_CFLAGS := $RedefinedKeycodes^" > \
sed "s^SDL_ADDITIONAL_CFLAGS :=.*^SDL_ADDITIONAL_CFLAGS := $RedefinedKeycodes^" | \
sed "s^APPLICATION_SUBDIRS_BUILD :=.*^APPLICATION_SUBDIRS_BUILD := $AppSubdirsBuild^" > \
project/jni/Android.mk.1
if [ -n "`diff -w project/jni/Android.mk.1 project/jni/Android.mk`" ] ; then
mv -f project/jni/Android.mk.1 project/jni/Android.mk

View File

@@ -23,11 +23,13 @@ SDL_TRACKBALL_KEYUP_DELAY := 1
# resized in HW-accelerated way, however it eats a tiny bit of CPU
SDL_VIDEO_RENDER_RESIZE := 1
COMPILED_LIBRARIES := sdl_mixer
COMPILED_LIBRARIES :=
APPLICATION_ADDITIONAL_CFLAGS := -finline-functions -O2
APPLICATION_ADDITIONAL_CFLAGS := -finline-functions -O2 -DTREMOR=1 -DBUILD_TYPE=LINUX32 -DTARGET_LNX=1
APPLICATION_ADDITIONAL_LDFLAGS :=
APPLICATION_ADDITIONAL_LDFLAGS := -Lbin/ndk/local/armeabi -ltremor
APPLICATION_SUBDIRS_BUILD := src
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=LCTRL -DSDL_ANDROID_KEYCODE_1=LALT -DSDL_ANDROID_KEYCODE_2=SPACE -DSDL_ANDROID_KEYCODE_3=RETURN -DSDL_ANDROID_KEYCODE_4=RETURN

View File

@@ -5,6 +5,6 @@ APP_PROJECT_PATH := $(call my-dir)/..
# sdl_image depends on png and jpeg
# sdl_ttf depends on freetype
APP_MODULES := application sdl sdl_main stlport tremor png jpeg freetype sdl_mixer
APP_MODULES := application sdl sdl_main stlport tremor png jpeg freetype
APP_ABI := armeabi

View File

@@ -5,6 +5,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE := application
APP_SUBDIRS := $(patsubst $(LOCAL_PATH)/%, %, $(shell find $(LOCAL_PATH)/src/ -type d))
ifneq ($(APP_SUBDIRS_BUILD),)
APP_SUBDIRS := $(APP_SUBDIRS_BUILD)
endif
LOCAL_CFLAGS := $(foreach D, $(APP_SUBDIRS), -I$(LOCAL_PATH)/$(D)) \
-I$(LOCAL_PATH)/../sdl/include \

View File

@@ -48,5 +48,5 @@ class Globals {
}
class LoadLibrary {
public LoadLibrary() { System.loadLibrary("sdl"); System.loadLibrary("sdl_mixer"); };
public LoadLibrary() { System.loadLibrary("sdl"); };
}