Makefile.android
author Sam Lantinga <slouken@libsdl.org>
Tue, 04 Jan 2011 18:55:23 -0800
changeset 4958 47e9f1629e62
parent 4955 361ada59e3aa
child 4960 0ab2492f2e17
permissions -rwxr-xr-x
We don't need these scripts anymore
paul@4700
     1
# Makefile to build the SDL library
paul@4700
     2
slouken@4955
     3
include ./android/config.cfg #get ANDROID_NDK, ANDROID_NDK_HOST
paul@4714
     4
slouken@4955
     5
TOOLS_PATH=$(ANDROID_NDK)/toolchains/arm-eabi-4.4.0/prebuilt/$(ANDROID_NDK_HOST)/bin
slouken@4941
     6
ANDROID_INCLUDES = -I$(ANDROID_NDK)/platforms/android-4/arch-arm/usr/include 
paul@4700
     7
INCLUDE = -I./include
slouken@4951
     8
CFLAGS  = -g -O2 -fno-short-enums $(INCLUDE) $(ANDROID_INCLUDES) -DANDROID -DANDROID_NDK -static
paul@4700
     9
paul@4700
    10
AR	= $(TOOLS_PATH)/arm-eabi-ar
paul@4700
    11
RANLIB	= $(TOOLS_PATH)/arm-eabi-ranlib
paul@4700
    12
CC = $(TOOLS_PATH)/arm-eabi-gcc
paul@4700
    13
paul@4700
    14
paul@4700
    15
CONFIG_H = include/SDL_config.h
paul@4700
    16
TARGET  = libSDL.a
paul@4700
    17
SOURCES = \
paul@4700
    18
	src/*.c \
paul@4700
    19
	src/audio/*.c \
paul@4700
    20
	src/cpuinfo/*.c \
paul@4700
    21
	src/events/*.c \
paul@4700
    22
	src/file/*.c \
paul@4700
    23
	src/joystick/*.c \
paul@4700
    24
	src/haptic/*.c \
paul@4700
    25
	src/stdlib/*.c \
paul@4700
    26
	src/thread/*.c \
paul@4700
    27
	src/timer/*.c \
paul@4700
    28
	src/video/*.c \
paul@4700
    29
	src/power/*.c \
paul@4718
    30
	src/audio/android/*.c \
paul@4701
    31
	src/video/android/*.c \
paul@4722
    32
	src/joystick/android/*.c \
paul@4700
    33
	src/haptic/dummy/*.c \
paul@4700
    34
	src/atomic/dummy/*.c \
paul@4720
    35
	src/thread/pthread/*.c \
paul@4720
    36
	src/timer/unix/*.c \
paul@4700
    37
	src/loadso/dummy/*.c \
paul@4700
    38
paul@4700
    39
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
paul@4700
    40
paul@4700
    41
all: $(TARGET)
paul@4700
    42
paul@4700
    43
$(TARGET): $(CONFIG_H) $(OBJECTS)
paul@4700
    44
	$(AR) crv $@ $^
paul@4700
    45
	$(RANLIB) $@
paul@4700
    46
paul@4700
    47
$(CONFIG_H):
paul@4700
    48
	cp $(CONFIG_H).default $(CONFIG_H)
paul@4700
    49
paul@4700
    50
clean:
paul@4700
    51
	rm -f $(TARGET) $(OBJECTS)