annotate Makefile.android @ 4727:8087bb208acf

Updated the readme
author Paul Hunkin <paul@bieh.net>
date Tue, 17 Aug 2010 17:28:14 +1200
parents faa228f7ce5b
children bd009a923441
rev   line source
4700
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
1 # Makefile to build the SDL library
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
2
4714
0f05f2f16fad - Modified build system
Paul Hunkin <paul@bieh.net>
parents: 4701
diff changeset
3 include ./android/config.cfg #get ANDROID_NDK
0f05f2f16fad - Modified build system
Paul Hunkin <paul@bieh.net>
parents: 4701
diff changeset
4
4700
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
5 TOOLS_PATH=$(ANDROID_NDK)/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
6 ANDROID_INCLUDES = -I$(ANDROID_NDK)/build/platforms/android-4/common/include \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
7 -I$(ANDROID_NDK)/build/platforms/android-4/arch-arm/usr/include
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
8 INCLUDE = -I./include
4701
d40bb3165d2b Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents: 4700
diff changeset
9 CFLAGS = -g -O2 $(INCLUDE) $(ANDROID_INCLUDES) -DANDROID -DANDROID_NDK -static
4700
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
10
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
11 AR = $(TOOLS_PATH)/arm-eabi-ar
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
12 RANLIB = $(TOOLS_PATH)/arm-eabi-ranlib
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
13 CC = $(TOOLS_PATH)/arm-eabi-gcc
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
14
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
15
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
16 CONFIG_H = include/SDL_config.h
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
17 TARGET = libSDL.a
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
18 SOURCES = \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
19 src/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
20 src/audio/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
21 src/cpuinfo/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
22 src/events/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
23 src/file/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
24 src/joystick/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
25 src/haptic/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
26 src/stdlib/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
27 src/thread/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
28 src/timer/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
29 src/video/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
30 src/power/*.c \
4718
79aa6c61f33b Added stub android sound system
Paul Hunkin <paul@bieh.net>
parents: 4714
diff changeset
31 src/audio/android/*.c \
4701
d40bb3165d2b Added (partially implemented) android video backend and associated files needed to build
Paul Hunkin <paul@bieh.net>
parents: 4700
diff changeset
32 src/video/android/*.c \
4722
faa228f7ce5b - Cleaned up a bunch of code
Paul Hunkin <paul@bieh.net>
parents: 4720
diff changeset
33 src/joystick/android/*.c \
4700
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
34 src/haptic/dummy/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
35 src/atomic/dummy/*.c \
4720
80f8d672b52e Oops, I wasn't using pthreads. Fixed so we can have mutexes and stuff
Paul Hunkin <paul@bieh.net>
parents: 4718
diff changeset
36 src/thread/pthread/*.c \
80f8d672b52e Oops, I wasn't using pthreads. Fixed so we can have mutexes and stuff
Paul Hunkin <paul@bieh.net>
parents: 4718
diff changeset
37 src/timer/unix/*.c \
4700
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
38 src/loadso/dummy/*.c \
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
39
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
40 OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
41
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
42 all: $(TARGET)
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
43
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
44 $(TARGET): $(CONFIG_H) $(OBJECTS)
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
45 $(AR) crv $@ $^
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
46 $(RANLIB) $@
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
47
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
48 $(CONFIG_H):
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
49 cp $(CONFIG_H).default $(CONFIG_H)
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
50
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
51 clean:
cf23d9b8e606 Added some android build stuff
Paul Hunkin <paul@bieh.net>
parents:
diff changeset
52 rm -f $(TARGET) $(OBJECTS)