Android.mk 2.85 KB
Newer Older
1
# This is the Android makefile for libyuv for NDK.
2
LOCAL_PATH:= $(call my-dir)
3

4 5 6
include $(CLEAR_VARS)

LOCAL_CPP_EXTENSION := .cc
7

8
LOCAL_SRC_FILES := \
9 10
    source/compare.cc           \
    source/compare_common.cc    \
11
    source/compare_gcc.cc       \
12
    source/compare_msa.cc       \
13 14
    source/compare_neon.cc      \
    source/compare_neon64.cc    \
15 16 17 18
    source/convert.cc           \
    source/convert_argb.cc      \
    source/convert_from.cc      \
    source/convert_from_argb.cc \
19 20
    source/convert_to_argb.cc   \
    source/convert_to_i420.cc   \
21 22 23
    source/cpu_id.cc            \
    source/planar_functions.cc  \
    source/rotate.cc            \
24
    source/rotate_any.cc        \
25
    source/rotate_argb.cc       \
26 27
    source/rotate_common.cc     \
    source/rotate_gcc.cc        \
28 29 30
    source/rotate_msa.cc        \
    source/rotate_neon.cc       \
    source/rotate_neon64.cc     \
31
    source/row_any.cc           \
32
    source/row_common.cc        \
33
    source/row_gcc.cc           \
34 35 36
    source/row_msa.cc           \
    source/row_neon.cc          \
    source/row_neon64.cc        \
37
    source/scale.cc             \
38
    source/scale_any.cc         \
39
    source/scale_argb.cc        \
40
    source/scale_common.cc      \
41
    source/scale_gcc.cc         \
42 43 44
    source/scale_msa.cc         \
    source/scale_neon.cc        \
    source/scale_neon64.cc      \
45
    source/video_common.cc
46

47 48 49 50 51 52 53
common_CFLAGS := -Wall -fexceptions
ifneq ($(LIBYUV_DISABLE_JPEG), "yes")
LOCAL_SRC_FILES += \
    source/convert_jpeg.cc      \
    source/mjpeg_decoder.cc     \
    source/mjpeg_validate.cc
common_CFLAGS += -DHAVE_JPEG
54
LOCAL_SHARED_LIBRARIES := libjpeg
55 56 57
endif

LOCAL_CFLAGS += $(common_CFLAGS)
58
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
59
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
60
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
61

62
LOCAL_MODULE := libyuv_static
63 64 65 66
LOCAL_MODULE_TAGS := optional

include $(BUILD_STATIC_LIBRARY)

67 68 69 70
include $(CLEAR_VARS)

LOCAL_WHOLE_STATIC_LIBRARIES := libyuv_static
LOCAL_MODULE := libyuv
71
ifneq ($(LIBYUV_DISABLE_JPEG), "yes")
72
LOCAL_SHARED_LIBRARIES := libjpeg
73
endif
74 75

include $(BUILD_SHARED_LIBRARY)
76 77 78 79 80 81 82 83 84 85 86 87 88 89

include $(CLEAR_VARS)
LOCAL_STATIC_LIBRARIES := libyuv_static
LOCAL_SHARED_LIBRARIES := libjpeg
LOCAL_MODULE_TAGS := tests
LOCAL_CPP_EXTENSION := .cc
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
LOCAL_SRC_FILES := \
    unit_test/unit_test.cc        \
    unit_test/basictypes_test.cc  \
    unit_test/color_test.cc       \
    unit_test/compare_test.cc     \
    unit_test/convert_test.cc     \
    unit_test/cpu_test.cc         \
90
    unit_test/cpu_thread_test.cc  \
91 92 93 94 95 96 97 98 99 100
    unit_test/math_test.cc        \
    unit_test/planar_test.cc      \
    unit_test/rotate_argb_test.cc \
    unit_test/rotate_test.cc      \
    unit_test/scale_argb_test.cc  \
    unit_test/scale_test.cc       \
    unit_test/video_common_test.cc

LOCAL_MODULE := libyuv_unittest
include $(BUILD_NATIVE_TEST)