forked from SDL-mirror/SDL_ttf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
63 lines (43 loc) · 1.34 KB
/
Android.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Save the local path
SDL_TTF_LOCAL_PATH := $(call my-dir)
# Enable this if you want to use HarfBuzz
SUPPORT_HARFBUZZ ?= false
HARFBUZZ_LIBRARY_PATH := external/harfbuzz-2.3.1
FREETYPE_LIBRARY_PATH := external/freetype-2.10.1
# Build freetype library
ifneq ($(FREETYPE_LIBRARY_PATH),)
include $(SDL_TTF_LOCAL_PATH)/$(FREETYPE_LIBRARY_PATH)/Android.mk
endif
# Build the library
ifeq ($(SUPPORT_HARFBUZZ),true)
include $(SDL_TTF_LOCAL_PATH)/$(HARFBUZZ_LIBRARY_PATH)/Android.mk
endif
# Restore local path
LOCAL_PATH := $(SDL_TTF_LOCAL_PATH)
include $(CLEAR_VARS)
LOCAL_MODULE := SDL2_ttf
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := SDL_ttf.c.neon
LOCAL_CFLAGS += -O2
ifneq ($(FREETYPE_LIBRARY_PATH),)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(FREETYPE_LIBRARY_PATH)/include
LOCAL_STATIC_LIBRARIES += freetype
endif
ifeq ($(SUPPORT_HARFBUZZ),true)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(HARFBUZZ_LIBRARY_PATH)/src
LOCAL_CFLAGS += -DTTF_USE_HARFBUZZ
LOCAL_STATIC_LIBRARIES += harfbuzz
endif
LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
include $(BUILD_SHARED_LIBRARY)
###########################
#
# SDL2_ttf static library
#
###########################
LOCAL_MODULE := SDL2_ttf_static
LOCAL_MODULE_FILENAME := libSDL2_ttf
LOCAL_LDLIBS :=
LOCAL_EXPORT_LDLIBS :=
include $(BUILD_STATIC_LIBRARY)