Skip to content

Commit

Permalink
Minor fixes to build system
Browse files Browse the repository at this point in the history
  • Loading branch information
pelya committed Jul 5, 2011
1 parent b4546c9 commit 999950b
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion checkMissing.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ done
cat exports.txt | sort > exports1.txt cat exports.txt | sort > exports1.txt
mv -f exports1.txt exports.txt mv -f exports1.txt exports.txt
diff libapplication.txt exports.txt | grep \< | cut -d \ -f 2 diff libapplication.txt exports.txt | grep \< | cut -d \ -f 2
rm libapplication.txt exports.txt rm libapplication.txt exports.txt
7 changes: 2 additions & 5 deletions project/jni/application/setEnvironment-r4b.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]
APP_AVAILABLE_STATIC_LIBS=`grep 'APP_AVAILABLE_STATIC_LIBS [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@'` APP_AVAILABLE_STATIC_LIBS=`grep 'APP_AVAILABLE_STATIC_LIBS [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@'`
APP_SHARED_LIBS=$( APP_SHARED_LIBS=$(
echo $APP_MODULES | xargs -n 1 echo | while read LIB ; do echo $APP_MODULES | xargs -n 1 echo | while read LIB ; do
STATIC=`echo $APP_AVAILABLE_STATIC_LIBS | grep "\\\\b$LIB\\\\b"` STATIC=`echo $APP_AVAILABLE_STATIC_LIBS application sdl_main stlport stdout-test | grep "\\\\b$LIB\\\\b"`
if [ "$LIB" = "application" ] ; then true if [ -n "$STATIC" ] ; then true
elif [ "$LIB" = "sdl_main" ] ; then true
elif [ "$LIB" = "stlport" ] ; then true
elif [ -n "$STATIC" ] ; then true
else else
echo $LIB echo $LIB
fi fi
Expand Down
7 changes: 2 additions & 5 deletions project/jni/application/setEnvironment-r5b.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]
APP_AVAILABLE_STATIC_LIBS=`grep 'APP_AVAILABLE_STATIC_LIBS [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@'` APP_AVAILABLE_STATIC_LIBS=`grep 'APP_AVAILABLE_STATIC_LIBS [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@'`
APP_SHARED_LIBS=$( APP_SHARED_LIBS=$(
echo $APP_MODULES | xargs -n 1 echo | while read LIB ; do echo $APP_MODULES | xargs -n 1 echo | while read LIB ; do
STATIC=`echo $APP_AVAILABLE_STATIC_LIBS | grep "\\\\b$LIB\\\\b"` STATIC=`echo $APP_AVAILABLE_STATIC_LIBS application sdl_main stlport stdout-test | grep "\\\\b$LIB\\\\b"`
if [ "$LIB" = "application" ] ; then true if [ -n "$STATIC" ] ; then true
elif [ "$LIB" = "sdl_main" ] ; then true
elif [ "$LIB" = "stlport" ] ; then true
elif [ -n "$STATIC" ] ; then true
else else
echo $LIB echo $LIB
fi fi
Expand Down
1 change: 1 addition & 0 deletions project/jni/png/Android.mk
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ common_C_INCLUDES += $(LOCAL_PATH)/include $(LOCAL_PATH)
LOCAL_SRC_FILES := $(common_SRC_FILES) LOCAL_SRC_FILES := $(common_SRC_FILES)
LOCAL_CFLAGS += $(common_CFLAGS) LOCAL_CFLAGS += $(common_CFLAGS)
LOCAL_C_INCLUDES += $(common_C_INCLUDES) LOCAL_C_INCLUDES += $(common_C_INCLUDES)
LOCAL_LDLIBS := -lz


LOCAL_MODULE:= png LOCAL_MODULE:= png


Expand Down
6 changes: 6 additions & 0 deletions project/jni/sdl-1.2/src/video/android/SDL_androidvideo-1.2.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ static SDL_Surface *ANDROID_SetVideoModeMT(_THIS, SDL_Surface *current, int widt
static void ANDROID_VideoQuitMT(_THIS); static void ANDROID_VideoQuitMT(_THIS);
static void ANDROID_UpdateRectsMT(_THIS, int numrects, SDL_Rect *rects); static void ANDROID_UpdateRectsMT(_THIS, int numrects, SDL_Rect *rects);
static int ANDROID_FlipHWSurfaceMT(_THIS, SDL_Surface *surface); static int ANDROID_FlipHWSurfaceMT(_THIS, SDL_Surface *surface);
static int ANDROID_ToggleFullScreen(_THIS, int fullscreen);




// Stubs to get rid of crashing in OpenGL mode // Stubs to get rid of crashing in OpenGL mode
Expand Down Expand Up @@ -106,6 +107,10 @@ void ANDROID_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
} }
//void ANDROID_MoveWMCursor(_THIS, int x, int y) { } //void ANDROID_MoveWMCursor(_THIS, int x, int y) { }


int ANDROID_ToggleFullScreen(_THIS, int fullscreen)
{
return 1;
}


#define SDL_NUMMODES 12 #define SDL_NUMMODES 12
static SDL_Rect *SDL_modelist[SDL_NUMMODES+1]; static SDL_Rect *SDL_modelist[SDL_NUMMODES+1];
Expand Down Expand Up @@ -191,6 +196,7 @@ static SDL_VideoDevice *ANDROID_CreateDevice(int devindex)
device->FreeWMCursor = ANDROID_FreeWMCursor; device->FreeWMCursor = ANDROID_FreeWMCursor;
device->CreateWMCursor = ANDROID_CreateWMCursor; device->CreateWMCursor = ANDROID_CreateWMCursor;
device->ShowWMCursor = ANDROID_ShowWMCursor; device->ShowWMCursor = ANDROID_ShowWMCursor;
device->ToggleFullScreen = ANDROID_ToggleFullScreen;


glLibraryHandle = dlopen("libGLESv1_CM.so", RTLD_NOW); glLibraryHandle = dlopen("libGLESv1_CM.so", RTLD_NOW);


Expand Down
13 changes: 12 additions & 1 deletion project/jni/sdl-1.3/src/video/android/SDL_touchscreenkeyboard.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -812,4 +812,15 @@ JAVA_EXPORT_NAME(Settings_nativeChmod) ( JNIEnv* env, jobject thiz, jstring j_n
int ret = chmod(name, mode); int ret = chmod(name, mode);
(*env)->ReleaseStringUTFChars(env, j_name, name); (*env)->ReleaseStringUTFChars(env, j_name, name);
return (ret == 0); return (ret == 0);
}; }

JNIEXPORT void JNICALL
JAVA_EXPORT_NAME(Settings_nativeSetEnv) ( JNIEnv* env, jobject thiz, jstring j_name, jstring j_value )
{
jboolean iscopy;
const char *name = (*env)->GetStringUTFChars(env, j_name, &iscopy);
const char *value = (*env)->GetStringUTFChars(env, j_value, &iscopy);
setenv(name, value, 1);
(*env)->ReleaseStringUTFChars(env, j_name, name);
(*env)->ReleaseStringUTFChars(env, j_value, value);
}
11 changes: 0 additions & 11 deletions project/jni/sdl_main/sdl_main.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -115,15 +115,4 @@ JAVA_EXPORT_NAME(DemoRenderer_nativeInit) ( JNIEnv* env, jobject thiz, jstring
#endif #endif
}; };


extern C_LINKAGE void
JAVA_EXPORT_NAME(Settings_nativeSetEnv) ( JNIEnv* env, jobject thiz, jstring j_name, jstring j_value )
{
jboolean iscopy;
const char *name = (*env)->GetStringUTFChars(env, j_name, &iscopy);
const char *value = (*env)->GetStringUTFChars(env, j_value, &iscopy);
setenv(name, value, 1);
(*env)->ReleaseStringUTFChars(env, j_name, name);
(*env)->ReleaseStringUTFChars(env, j_value, value);
}

#endif #endif

0 comments on commit 999950b

Please sign in to comment.