comparison Makefile.android @ 4700:cf23d9b8e606

Added some android build stuff
author Paul Hunkin <paul@bieh.net>
date Sun, 23 May 2010 15:18:16 +1200
parents
children d40bb3165d2b
comparison
equal deleted inserted replaced
4699:925008931501 4700:cf23d9b8e606
1 # Makefile to build the SDL library
2
3 ANDROID_NDK=/home/paul/Projects/gsoc/sdk/android-ndk-r4
4 TOOLS_PATH=$(ANDROID_NDK)/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin
5 ANDROID_INCLUDES = -I$(ANDROID_NDK)/build/platforms/android-4/common/include \
6 -I$(ANDROID_NDK)/build/platforms/android-4/arch-arm/usr/include
7 INCLUDE = -I./include
8 CFLAGS = -g -O2 $(INCLUDE) $(ANDROID_INCLUDES) -DANDROID -static
9
10 AR = $(TOOLS_PATH)/arm-eabi-ar
11 RANLIB = $(TOOLS_PATH)/arm-eabi-ranlib
12 CC = $(TOOLS_PATH)/arm-eabi-gcc
13
14
15 CONFIG_H = include/SDL_config.h
16 TARGET = libSDL.a
17 SOURCES = \
18 src/*.c \
19 src/audio/*.c \
20 src/cpuinfo/*.c \
21 src/events/*.c \
22 src/file/*.c \
23 src/joystick/*.c \
24 src/haptic/*.c \
25 src/stdlib/*.c \
26 src/thread/*.c \
27 src/timer/*.c \
28 src/video/*.c \
29 src/power/*.c \
30 src/audio/dummy/*.c \
31 src/video/dummy/*.c \
32 src/joystick/dummy/*.c \
33 src/haptic/dummy/*.c \
34 src/atomic/dummy/*.c \
35 src/thread/generic/*.c \
36 src/timer/dummy/*.c \
37 src/loadso/dummy/*.c \
38
39 OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
40
41 all: $(TARGET)
42
43 $(TARGET): $(CONFIG_H) $(OBJECTS)
44 $(AR) crv $@ $^
45 $(RANLIB) $@
46
47 $(CONFIG_H):
48 cp $(CONFIG_H).default $(CONFIG_H)
49
50 clean:
51 rm -f $(TARGET) $(OBJECTS)