Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Android: Removed all unnecessary dependencies on C++.
Browse files Browse the repository at this point in the history
C++ is a bit of a minefield on Android. Much functionality still doesn't work, and Android can't decide on which C++ standard library to use, so it provides 3 different ones, all of which are incompatible with each other. (It looks like clang is coming too which will add a new compiler and a 4th standard library.)

As middleware, SDL might be distributed as a binary and intermixed with other projects already using C++. If C++ is intermixed in a bad way, bad things will happen. Removing dependencies on C++ will avoid this problem and downstream users won't have to worry/care.
  • Loading branch information
Eric Wing committed Jul 22, 2013
1 parent 8ae0913 commit a0b0b65
Show file tree
Hide file tree
Showing 5 changed files with 337 additions and 279 deletions.
2 changes: 1 addition & 1 deletion Android.mk
Expand Up @@ -22,7 +22,7 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
$(wildcard $(LOCAL_PATH)/src/core/android/*.cpp) \
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
Expand Down
4 changes: 2 additions & 2 deletions README-android.txt
Expand Up @@ -28,10 +28,10 @@ android-project/src/org/libsdl/app/SDLActivity.java

The Java code loads your game code, the SDL shared library, and
dispatches to native functions implemented in the SDL library:
src/SDL_android.cpp
src/SDL_android.c

Your project must include some glue code that starts your main() routine:
src/main/android/SDL_android_main.cpp
src/main/android/SDL_android_main.c


================================================================================
Expand Down
2 changes: 1 addition & 1 deletion android-project/jni/src/Android.mk
Expand Up @@ -9,7 +9,7 @@ SDL_PATH := ../SDL
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include

# Add your application source files here...
LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.cpp \
LOCAL_SRC_FILES := $(SDL_PATH)/src/main/android/SDL_android_main.c \
YourSourceHere.c

LOCAL_SHARED_LIBRARIES := SDL2
Expand Down

0 comments on commit a0b0b65

Please sign in to comment.