Makefile.android
author Paul Hunkin <paul@bieh.net>
Tue, 27 Jul 2010 21:21:24 +0200
changeset 4722 faa228f7ce5b
parent 4720 80f8d672b52e
child 4941 bd009a923441
permissions -rwxr-xr-x
- Cleaned up a bunch of code
- Added 'feature' enable/disable so we're not running accel/sound/whatever in Java when we don't need to be
- More work on the sound system. But it still crashes pretty horribly, not sure why yet.
paul@4700
     1
# Makefile to build the SDL library
paul@4700
     2
paul@4714
     3
include ./android/config.cfg #get ANDROID_NDK
paul@4714
     4
paul@4700
     5
TOOLS_PATH=$(ANDROID_NDK)/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin
paul@4700
     6
ANDROID_INCLUDES = 	-I$(ANDROID_NDK)/build/platforms/android-4/common/include \
paul@4700
     7
					-I$(ANDROID_NDK)/build/platforms/android-4/arch-arm/usr/include 
paul@4700
     8
INCLUDE = -I./include
paul@4701
     9
CFLAGS  = -g -O2 $(INCLUDE) $(ANDROID_INCLUDES) -DANDROID -DANDROID_NDK -static
paul@4700
    10
paul@4700
    11
AR	= $(TOOLS_PATH)/arm-eabi-ar
paul@4700
    12
RANLIB	= $(TOOLS_PATH)/arm-eabi-ranlib
paul@4700
    13
CC = $(TOOLS_PATH)/arm-eabi-gcc
paul@4700
    14
paul@4700
    15
paul@4700
    16
CONFIG_H = include/SDL_config.h
paul@4700
    17
TARGET  = libSDL.a
paul@4700
    18
SOURCES = \
paul@4700
    19
	src/*.c \
paul@4700
    20
	src/audio/*.c \
paul@4700
    21
	src/cpuinfo/*.c \
paul@4700
    22
	src/events/*.c \
paul@4700
    23
	src/file/*.c \
paul@4700
    24
	src/joystick/*.c \
paul@4700
    25
	src/haptic/*.c \
paul@4700
    26
	src/stdlib/*.c \
paul@4700
    27
	src/thread/*.c \
paul@4700
    28
	src/timer/*.c \
paul@4700
    29
	src/video/*.c \
paul@4700
    30
	src/power/*.c \
paul@4718
    31
	src/audio/android/*.c \
paul@4701
    32
	src/video/android/*.c \
paul@4722
    33
	src/joystick/android/*.c \
paul@4700
    34
	src/haptic/dummy/*.c \
paul@4700
    35
	src/atomic/dummy/*.c \
paul@4720
    36
	src/thread/pthread/*.c \
paul@4720
    37
	src/timer/unix/*.c \
paul@4700
    38
	src/loadso/dummy/*.c \
paul@4700
    39
paul@4700
    40
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
paul@4700
    41
paul@4700
    42
all: $(TARGET)
paul@4700
    43
paul@4700
    44
$(TARGET): $(CONFIG_H) $(OBJECTS)
paul@4700
    45
	$(AR) crv $@ $^
paul@4700
    46
	$(RANLIB) $@
paul@4700
    47
paul@4700
    48
$(CONFIG_H):
paul@4700
    49
	cp $(CONFIG_H).default $(CONFIG_H)
paul@4700
    50
paul@4700
    51
clean:
paul@4700
    52
	rm -f $(TARGET) $(OBJECTS)