Skip to content

Latest commit

 

History

History
89 lines (70 loc) · 2.17 KB

Android.mk

File metadata and controls

89 lines (70 loc) · 2.17 KB
 
Oct 22, 2017
Oct 22, 2017
1
MY_LOCAL_PATH := $(call my-dir)
May 28, 2013
May 28, 2013
4
5
# Enable this if you want to support loading JPEG images
# The library path should be a relative path to this directory.
Apr 18, 2014
Apr 18, 2014
6
SUPPORT_JPG ?= true
Oct 22, 2017
Oct 22, 2017
7
JPG_LIBRARY_PATH := external/jpeg-9b
May 28, 2013
May 28, 2013
8
9
10
# Enable this if you want to support loading PNG images
# The library path should be a relative path to this directory.
Apr 18, 2014
Apr 18, 2014
11
SUPPORT_PNG ?= true
Oct 22, 2017
Oct 22, 2017
12
PNG_LIBRARY_PATH := external/libpng-1.6.32
May 28, 2013
May 28, 2013
13
14
15
# Enable this if you want to support loading WebP images
# The library path should be a relative path to this directory.
Oct 22, 2017
Oct 22, 2017
16
SUPPORT_WEBP ?= true
Oct 22, 2017
Oct 22, 2017
17
WEBP_LIBRARY_PATH := external/libwebp-0.6.0
May 28, 2013
May 28, 2013
18
Jun 2, 2013
Jun 2, 2013
19
Oct 22, 2017
Oct 22, 2017
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Build the library
ifeq ($(SUPPORT_JPG),true)
include $(MY_LOCAL_PATH)/$(JPG_LIBRARY_PATH)/Android.mk
endif
# Build the library
ifeq ($(SUPPORT_PNG),true)
include $(MY_LOCAL_PATH)/$(PNG_LIBRARY_PATH)/Android.mk
endif
# Build the library
ifeq ($(SUPPORT_WEBP),true)
include $(MY_LOCAL_PATH)/$(WEBP_LIBRARY_PATH)/Android.mk
endif
# Restore local path
LOCAL_PATH := $(MY_LOCAL_PATH)
include $(CLEAR_VARS)
LOCAL_MODULE := SDL2_image
Oct 23, 2017
Oct 23, 2017
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LOCAL_SRC_FILES := \
IMG.c \
IMG_bmp.c \
IMG_gif.c \
IMG_jpg.c \
IMG_lbm.c \
IMG_pcx.c \
IMG_png.c \
IMG_pnm.c \
IMG_svg.c \
IMG_tga.c \
IMG_tif.c \
IMG_webp.c \
IMG_WIC.c \
IMG_xcf.c \
IMG_xpm.c.arm \
IMG_xv.c \
IMG_xxx.c
Oct 22, 2017
Oct 22, 2017
62
63
LOCAL_CFLAGS := -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNM \
-DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV
May 28, 2013
May 28, 2013
64
65
LOCAL_LDLIBS :=
LOCAL_STATIC_LIBRARIES :=
Jan 31, 2012
Jan 31, 2012
66
LOCAL_SHARED_LIBRARIES := SDL2
May 28, 2013
May 28, 2013
68
ifeq ($(SUPPORT_JPG),true)
Jun 2, 2013
Jun 2, 2013
69
70
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(JPG_LIBRARY_PATH)
LOCAL_CFLAGS += -DLOAD_JPG
Oct 22, 2017
Oct 22, 2017
71
LOCAL_STATIC_LIBRARIES += jpeg
May 28, 2013
May 28, 2013
72
73
74
endif
ifeq ($(SUPPORT_PNG),true)
Jun 2, 2013
Jun 2, 2013
75
76
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(PNG_LIBRARY_PATH)
LOCAL_CFLAGS += -DLOAD_PNG
Oct 22, 2017
Oct 22, 2017
77
LOCAL_STATIC_LIBRARIES += png
May 28, 2013
May 28, 2013
78
79
LOCAL_LDLIBS += -lz
endif
May 28, 2013
May 28, 2013
81
ifeq ($(SUPPORT_WEBP),true)
Jun 2, 2013
Jun 2, 2013
82
83
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(WEBP_LIBRARY_PATH)/src
LOCAL_CFLAGS += -DLOAD_WEBP
May 28, 2013
May 28, 2013
84
85
LOCAL_STATIC_LIBRARIES += webp
endif
Oct 22, 2017
Oct 22, 2017
87
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)
Jun 17, 2013
Jun 17, 2013
88
89
include $(BUILD_SHARED_LIBRARY)