Mercurial > sdl-ios-xcode
annotate Android.mk @ 5029:5d7d48157be7
Greg Jandl to SDL
I did some digging, and I think I've found a better solution. By
including some additional .m4 macros in the acinclude directory
(http://www.gnu.org/software/autoconf-archive/ax_check_compiler_flags.html,
http://www.gnu.org/software/autoconf-archive/ax_gcc_archflag.html and
http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html)
then using the patch below (same as previous patch + one line change
to configure.in), SDL will build correctly out of the box.
The arch can then be overridden by --with-gcc-arch=<arch> (most will
probably want to build with i686 there for general distribution) or
--without-gcc-arch, to disable setting the arch all together.
On my Atom netbook, I get -march=PentiumPro by default, which works
great, as does --with-gcc-arch=i686.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 18 Jan 2011 22:40:45 -0800 |
parents | 3a95a2b93eb3 |
children | 327f181542f1 |
rev | line source |
---|---|
4964
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 LOCAL_PATH := $(call my-dir) |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
3 ########################### |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 # |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 # SDL shared library |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
6 # |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 ########################### |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 include $(CLEAR_VARS) |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 LOCAL_MODULE := SDL |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 LOCAL_SRC_FILES := src/SDL_android.cpp \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
16 $(subst $(LOCAL_PATH)/,, \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 $(wildcard $(LOCAL_PATH)/src/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 $(wildcard $(LOCAL_PATH)/src/audio/*.c) \ |
5003
3a95a2b93eb3
Updated the atomic API for better use cases
Sam Lantinga <slouken@libsdl.org>
parents:
4964
diff
changeset
|
19 $(LOCAL_PATH)/src/atomic/SDL_atomic.c \ |
3a95a2b93eb3
Updated the atomic API for better use cases
Sam Lantinga <slouken@libsdl.org>
parents:
4964
diff
changeset
|
20 $(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \ |
4964
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 $(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 $(wildcard $(LOCAL_PATH)/src/events/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 $(wildcard $(LOCAL_PATH)/src/file/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 $(wildcard $(LOCAL_PATH)/src/joystick/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 $(wildcard $(LOCAL_PATH)/src/haptic/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 $(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 $(wildcard $(LOCAL_PATH)/src/thread/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 $(wildcard $(LOCAL_PATH)/src/timer/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 $(wildcard $(LOCAL_PATH)/src/video/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 $(wildcard $(LOCAL_PATH)/src/power/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 $(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 $(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
33 $(wildcard $(LOCAL_PATH)/src/video/android/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 $(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 $(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 $(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 $(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \ |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
38 $(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c)) |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
39 |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
40 LOCAL_LDLIBS := -ldl -lGLESv1_CM -llog |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
41 |
6c645018741e
Build the SDL library as a shared object on Android, so it will work correctly with SDL_image and SDL_ttf.
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
42 include $(BUILD_SHARED_LIBRARY) |