# マルチプラットフォーム描画エンジン「Sherry」
# Copyright (C) 2010-2011 SherryProject. all rights reserved.
#
# The MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in 
# all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# Android Sherry Makefile.  Generated from Makefile.in by configure.

# VARS
ANDROID_NDK_ROOT=C:/cygwin/home/developer2/android-ndk-r5
SYSROOT=$(ANDROID_NDK_ROOT)/platforms/android-8/arch-arm
CC = $(ANDROID_NDK_ROOT)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-gcc --sysroot=$(SYSROOT)
AR = $(ANDROID_NDK_ROOT)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-ar
LIBNAME = libsherrylib.a

SRCDIR = ../../../src/
OBJDIR = ./obj/

WORNINGOPT = -W -Wformat=2 -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wfloat-equal -Wpointer-arith
CFLAGS = -march=armv7-a -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=neon -mandroid -O2 -DANDROID
ARFLAGS = r
LDFLAGS = -L../../../lib/libpng/libpng_arm_ar.a -L../../../lib/libxml/libxml2_arm_ar.a -L../../../lib/zlib/libz_arm_ar.a

INCLUDES = -I../../../include/ -I../../../include/iconv -I../../../include/zlib -I../../../include/libxml -I../../../include/libpng
LDLIBS = ../../../lib/libpng/libpng_arm_ar.a ../../../lib/libxml/libxml2_arm_ar.a ../../../lib/zlib/libz_arm_ar.a

SRCS = $(SRCDIR)shApplication_android.c \
		$(SRCDIR)shDebug.c \
		$(SRCDIR)shDevice.c \
		$(SRCDIR)sherry.c \
		$(SRCDIR)shMath.c \
		$(SRCDIR)shMesh.c \
		$(SRCDIR)shShader.c \
		$(SRCDIR)shSprite.c \
		$(SRCDIR)shSystem.c \
		$(SRCDIR)shTexture.c
#
OBJS = $(OBJDIR)shApplication_android.o \
		$(OBJDIR)shDebug.o \
		$(OBJDIR)shDevice.o \
		$(OBJDIR)sherry.o \
		$(OBJDIR)shMath.o \
		$(OBJDIR)shMesh.o \
		$(OBJDIR)shShader.o \
		$(OBJDIR)shSprite.o \
		$(OBJDIR)shSystem.o \
		$(OBJDIR)shTexture.o
#
# make
#
all: $(LIBNAME)
#
$(OBJDIR)%.o : $(SRCDIR)%.c
	$(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) -c -o $@ $<
#
$(LIBNAME) : $(OBJS)
			$(AR) $(ARFLAGS) $(LIBNAME) $(LDLIBS) $(OBJS)
			@echo $(LIBNAME) make success.
#
clean:;		@rm -f $(OBJS)
			@rm -f $(LFILE)
			@echo clean files.

#EOF