ba0c5ea90d
Generate SkUserConfig. Include arm64 as another build flavor. Add tests. gyp/common_conditions.gypi: Add conditions for Android framework. These will get written into the generated SkUserConfig. include/core/SkUserConfig.h: Generated version that will ultimately be checked into Android (but not here). platform_tools/android/bin/gyp_to_android.py: Generate SkUserConfig. Add arm64 (note that arm64 is not currently respected by our gyp files, so it results in use _none.cpp for the various opts). Reset the common defines, which are now passed to the generated SkUserConfig. platform_tools/android/gyp_gen/generate_user_config.py: New script to generate SkUserConfig.h. platform_tools/android/gyp_gen/gypd_parser.py: Fix a lint error (unused import). platform_tools/android/gyp_gen/makefile_writer.py: Append any remaining DEFINES to LOCAL_CFLAGS (previously this was done during parsing). Add a warning for arm64 (corresponds to downstream Android.mk). platform_tools/android/gyp_gen/vars_dict_lib.py: Add OrderedSet.reset(). Add DEFINES to VarsDict. platform_tools/android/tests/expectations/: Add and update expectations files. platform_tools/android/tests/generate_user_config_tests.py: New test for generate_user_config.py platform_tools/android/tests/inputs/SkUserConfig.h: Input to the new test, so we don't have to update the expectations each time the real SkUserConfig.h changes. platform_tools/android/tests/makefile_writer_tests.py: Add a way to rebaseline test_write_local_vars, which has changed. Refactor EXPECTATIONS_DIR and compare_files into a separate file for sharing with generate_user_config_tests.py. platform_tools/android/tests/utils.py: Common code for tests. platform_tools/android/tests/var_dict_tests.py: Use a for loop to test the new key (DEFINES) and future proof this test to test any new keys in the future. BUG=skia:1975 R=djsollen@google.com, halcanary@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/198063002 git-svn-id: http://skia.googlecode.com/svn/trunk@13975 2bbb7eff-a529-9590-31e7-b0007b416f81
150 lines
3.5 KiB
Makefile
150 lines
3.5 KiB
Makefile
|
|
###############################################################################
|
|
#
|
|
# THIS FILE IS AUTOGENERATED BY GYP_TO_ANDROID.PY. DO NOT EDIT.
|
|
#
|
|
###############################################################################
|
|
|
|
BASE_PATH := $(call my-dir)
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
###############################################################################
|
|
#
|
|
# PROBLEMS WITH SKIA DEBUGGING?? READ THIS...
|
|
#
|
|
# The debug build results in changes to the Skia headers. This means that those
|
|
# using libskia must also be built with the debug version of the Skia headers.
|
|
# There are a few scenarios where this comes into play:
|
|
#
|
|
# (1) You're building debug code that depends on libskia.
|
|
# (a) If libskia is built in release, then define SK_RELEASE when building
|
|
# your sources.
|
|
# (b) If libskia is built with debugging (see step 2), then no changes are
|
|
# needed since your sources and libskia have been built with SK_DEBUG.
|
|
# (2) You're building libskia in debug mode.
|
|
# (a) RECOMMENDED: You can build the entire system in debug mode. Do this by
|
|
# updating your build/config.mk to include -DSK_DEBUG on the line that
|
|
# defines COMMON_GLOBAL_CFLAGS
|
|
# (b) You can update all the users of libskia to define SK_DEBUG when they are
|
|
# building their sources.
|
|
#
|
|
# NOTE: If neither SK_DEBUG or SK_RELEASE are defined then Skia checks NDEBUG to
|
|
# determine which build type to use.
|
|
###############################################################################
|
|
|
|
include $(CLEAR_VARS)
|
|
LOCAL_ARM_MODE := thumb
|
|
ifeq ($(TARGET_ARCH),arm)
|
|
ifeq ($(ARCH_ARM_HAVE_VFP),true)
|
|
LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE
|
|
endif
|
|
else
|
|
LOCAL_CFLAGS += -DANDROID_LARGE_MEMORY_DEVICE
|
|
endif
|
|
|
|
# used for testing
|
|
#LOCAL_CFLAGS += -g -O0
|
|
|
|
ifeq ($(NO_FALLBACK_FONT),true)
|
|
LOCAL_CFLAGS += -DNO_FALLBACK_FONT
|
|
endif
|
|
|
|
ifeq ($(TARGET_ARCH),arm64)
|
|
$(warning TODOArm64: Unlike arm32, arm64 has no inline assembly for performance critical code.)
|
|
endif
|
|
|
|
LOCAL_CFLAGS += \
|
|
local_cflags
|
|
|
|
LOCAL_CPPFLAGS := \
|
|
local_cppflags
|
|
|
|
LOCAL_SRC_FILES := \
|
|
local_src_files
|
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
|
local_shared_libraries
|
|
|
|
LOCAL_STATIC_LIBRARIES := \
|
|
local_static_libraries
|
|
|
|
LOCAL_C_INCLUDES := \
|
|
local_c_includes
|
|
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS := \
|
|
local_export_c_include_dirs
|
|
|
|
LOCAL_CFLAGS += \
|
|
-Ddefines
|
|
|
|
ifeq ($(COND), true)
|
|
LOCAL_CFLAGS_foo += \
|
|
local_cflags_foo
|
|
|
|
LOCAL_CPPFLAGS_foo += \
|
|
local_cppflags_foo
|
|
|
|
LOCAL_SRC_FILES_foo += \
|
|
local_src_files_foo
|
|
|
|
LOCAL_SHARED_LIBRARIES_foo += \
|
|
local_shared_libraries_foo
|
|
|
|
LOCAL_STATIC_LIBRARIES_foo += \
|
|
local_static_libraries_foo
|
|
|
|
LOCAL_C_INCLUDES_foo += \
|
|
local_c_includes_foo
|
|
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS_foo += \
|
|
local_export_c_include_dirs_foo
|
|
|
|
LOCAL_CFLAGS_foo += \
|
|
-Ddefines_foo
|
|
|
|
endif
|
|
|
|
LOCAL_CFLAGS_bar += \
|
|
local_cflags_bar
|
|
|
|
LOCAL_CPPFLAGS_bar += \
|
|
local_cppflags_bar
|
|
|
|
LOCAL_SRC_FILES_bar += \
|
|
local_src_files_bar
|
|
|
|
LOCAL_SHARED_LIBRARIES_bar += \
|
|
local_shared_libraries_bar
|
|
|
|
LOCAL_STATIC_LIBRARIES_bar += \
|
|
local_static_libraries_bar
|
|
|
|
LOCAL_C_INCLUDES_bar += \
|
|
local_c_includes_bar
|
|
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS_bar += \
|
|
local_export_c_include_dirs_bar
|
|
|
|
LOCAL_CFLAGS_bar += \
|
|
-Ddefines_bar
|
|
|
|
include external/stlport/libstlport.mk
|
|
LOCAL_MODULE:= libskia
|
|
include $(BUILD_SHARED_LIBRARY)
|
|
|
|
#############################################################
|
|
# Build the skia tools
|
|
#
|
|
|
|
# benchmark (timings)
|
|
#include $(BASE_PATH)/bench/Android.mk
|
|
|
|
# golden-master (fidelity / regression test)
|
|
#include $(BASE_PATH)/gm/Android.mk
|
|
|
|
# unit-tests
|
|
#include $(BASE_PATH)/tests/Android.mk
|
|
|
|
# pathOps unit-tests
|
|
# TODO include those sources!
|