-
Notifications
You must be signed in to change notification settings - Fork 131
/
Android.mk
65 lines (44 loc) · 1.42 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
63
64
# Save the local path
SDL_TTF_LOCAL_PATH := $(call my-dir)
# Enable this if you want to use HarfBuzz
SUPPORT_HARFBUZZ ?= true
HARFBUZZ_LIBRARY_PATH := external/harfbuzz
FREETYPE_LIBRARY_PATH := external/freetype
# 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 := SDL3_ttf
LOCAL_SRC_FILES := src/SDL_ttf.c.neon
LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
LOCAL_CFLAGS += -O2
LOCAL_LDFLAGS := -Wl,--no-undefined -Wl,--version-script=$(LOCAL_PATH)/src/SDL_ttf.sym
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 := SDL3
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)/include
include $(BUILD_SHARED_LIBRARY)
###########################
#
# SDL3_ttf static library
#
###########################
LOCAL_MODULE := SDL3_ttf_static
LOCAL_MODULE_FILENAME := libSDL3_ttf
LOCAL_LDLIBS :=
LOCAL_EXPORT_LDLIBS :=
include $(BUILD_STATIC_LIBRARY)