OsmAnd/Osmand-kernel/skia/Android.mk

124 lines
3 KiB
Makefile
Raw Normal View History

2012-02-29 22:27:36 +01:00
# This file is based on external/skia/Android.mk from Android sources
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
2012-05-01 00:30:31 +02:00
include $(LOCAL_PATH)/Common.mk
ifneq ($(OSMAND_BUILDING_NEON_LIBRARY),true)
LOCAL_MODULE := skia
else
LOCAL_MODULE := skia_neon
LOCAL_ARM_NEON := true
endif
2012-02-29 22:27:36 +01:00
ifneq ($(OSMAND_USE_PREBUILT),true)
2012-02-29 22:27:36 +01:00
LOCAL_ARM_MODE := arm
# need a flag to tell the C side when we're on devices with large memory
# budgets (i.e. larger than the low-end devices that initially shipped)
ifeq ($(ARCH_ARM_HAVE_VFP),true)
LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE
endif
ifneq ($(ARCH_ARM_HAVE_VFP),true)
LOCAL_CFLAGS += -DSK_SOFTWARE_FLOAT
endif
ifeq ($(LOCAL_ARM_NEON),true)
2012-02-29 22:27:36 +01:00
LOCAL_CFLAGS += -D__ARM_HAVE_NEON
endif
2012-05-01 00:30:31 +02:00
# This file is replacement of $(OSMAND_SKIA_LOC)/src/ports/FontHostConfiguration_android.cpp
LOCAL_SRC_FILES += \
2012-06-17 12:30:45 +02:00
$(OSMAND_SKIA_LOC)/src/core/SkMMapStream.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkDebug_android.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkGlobalInitialization_default.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkFontHost_FreeType.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkFontHost_sandbox_none.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkFontHost_android.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkFontHost_gamma.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkFontHost_tables.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkMemory_malloc.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkOSFile_stdio.cpp \
$(OSMAND_SKIA_LOC)/src/ports/SkThread_pthread.cpp \
2012-04-25 18:45:51 +02:00
$(OSMAND_SKIA_LOC)/src/ports/SkTime_Unix.cpp \
2012-02-29 22:27:36 +01:00
FontHostConfiguration_android.cpp
LOCAL_C_INCLUDES += \
$(OSMAND_SKIA_ABS)/src/ports
2012-02-29 22:27:36 +01:00
ifeq ($(TARGET_ARCH),arm)
ifeq ($(LOCAL_ARM_NEON),true)
2012-02-29 22:27:36 +01:00
LOCAL_SRC_FILES += \
$(OSMAND_SKIA_LOC)/src/opts/memset16_neon.S \
$(OSMAND_SKIA_LOC)/src/opts/memset32_neon.S
2012-02-29 22:27:36 +01:00
endif
LOCAL_SRC_FILES += \
$(OSMAND_SKIA_LOC)/src/opts/opts_check_arm.cpp \
$(OSMAND_SKIA_LOC)/src/opts/memset.arm.S \
$(OSMAND_SKIA_LOC)/src/opts/SkBitmapProcState_opts_arm.cpp \
$(OSMAND_SKIA_LOC)/src/opts/SkBlitRow_opts_arm.cpp
2012-02-29 22:27:36 +01:00
else
LOCAL_SRC_FILES += \
$(OSMAND_SKIA_LOC)/src/opts/SkBlitRow_opts_none.cpp \
$(OSMAND_SKIA_LOC)/src/opts/SkBitmapProcState_opts_none.cpp \
$(OSMAND_SKIA_LOC)/src/opts/SkUtils_opts_none.cpp
2012-02-29 22:27:36 +01:00
endif
LOCAL_SHARED_LIBRARIES := \
libutils \
libz
ifeq ($(LOCAL_ARM_NEON),true)
LOCAL_STATIC_LIBRARIES += \
libjpeg_neon \
libft2_static_neon \
libpng_neon \
libgif_neon \
libexpat_static_neon
else
LOCAL_STATIC_LIBRARIES += \
libjpeg \
libft2_static \
2012-02-29 22:27:36 +01:00
libpng \
libgif \
libexpat_static
endif
2012-02-29 22:27:36 +01:00
ifeq ($(NO_FALLBACK_FONT),true)
LOCAL_CFLAGS += -DNO_FALLBACK_FONT
endif
LOCAL_CFLAGS += \
2012-02-29 22:27:36 +01:00
-DSK_BUILD_FOR_ANDROID \
-DSK_BUILD_FOR_ANDROID_NDK \
-DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0 \
-DSK_RELEASE \
-DGR_RELEASE=1 \
-DNDEBUG
LOCAL_CPPFLAGS := \
-fno-rtti \
-fno-exceptions
LOCAL_LDLIBS += -lz -llog
include $(BUILD_STATIC_LIBRARY)
else
LOCAL_SRC_FILES := \
2012-05-31 21:01:27 +02:00
../lib/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).a
include $(PREBUILT_STATIC_LIBRARY)
endif
2012-02-29 22:27:36 +01:00
# Fix some errors
BUILD_HOST_EXECUTABLE := $(LOCAL_PATH)/FakeHost.mk
2012-04-30 01:51:51 +02:00
BUILD_HOST_STATIC_LIBRARY := $(LOCAL_PATH)/FakeHost.mk