Skip to content

Latest commit

 

History

History
123 lines (109 loc) · 4.3 KB

Android.mk

File metadata and controls

123 lines (109 loc) · 4.3 KB
 
1
2
3
4
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
Jan 31, 2012
Jan 31, 2012
5
LOCAL_MODULE := SDL2_image
May 28, 2013
May 28, 2013
7
8
9
10
11
12
13
14
15
16
17
18
# Enable this if you want to support loading JPEG images
# The library path should be a relative path to this directory.
SUPPORT_JPG := true
JPG_LIBRARY_PATH := external/jpeg-9
# Enable this if you want to support loading PNG images
# The library path should be a relative path to this directory.
SUPPORT_PNG := true
PNG_LIBRARY_PATH := external/libpng-1.6.2
# Enable this if you want to support loading WebP images
# The library path should be a relative path to this directory.
Oct 3, 2013
Oct 3, 2013
19
20
21
#
# IMPORTANT: In order to enable this must have a symlink in your jni directory to external/libwebp-0.3.0.
SUPPORT_WEBP := false
May 28, 2013
May 28, 2013
22
23
WEBP_LIBRARY_PATH := external/libwebp-0.3.0
Jun 2, 2013
Jun 2, 2013
24
Jun 17, 2013
Jun 17, 2013
25
LOCAL_C_INCLUDES := $(LOCAL_PATH)
Jun 2, 2013
Jun 2, 2013
26
27
LOCAL_CFLAGS := -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNM \
-DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV
May 28, 2013
May 28, 2013
28
LOCAL_CFLAGS += -O3 -fstrict-aliasing -fprefetch-loop-arrays
Jan 11, 2011
Jan 11, 2011
30
LOCAL_SRC_FILES := $(notdir $(filter-out %/showimage.c, $(wildcard $(LOCAL_PATH)/*.c)))
May 28, 2013
May 28, 2013
32
33
LOCAL_LDLIBS :=
LOCAL_STATIC_LIBRARIES :=
Jan 31, 2012
Jan 31, 2012
34
LOCAL_SHARED_LIBRARIES := SDL2
May 28, 2013
May 28, 2013
36
ifeq ($(SUPPORT_JPG),true)
Jun 2, 2013
Jun 2, 2013
37
38
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(JPG_LIBRARY_PATH)
LOCAL_CFLAGS += -DLOAD_JPG
May 28, 2013
May 28, 2013
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# We can include the sources directly so the user doesn't have to...
#LOCAL_STATIC_LIBRARIES += jpeg
LOCAL_CFLAGS += -DAVOID_TABLES
LOCAL_SRC_FILES += \
$(JPG_LIBRARY_PATH)/jaricom.c \
$(JPG_LIBRARY_PATH)/jcapimin.c \
$(JPG_LIBRARY_PATH)/jcapistd.c \
$(JPG_LIBRARY_PATH)/jcarith.c \
$(JPG_LIBRARY_PATH)/jccoefct.c \
$(JPG_LIBRARY_PATH)/jccolor.c \
$(JPG_LIBRARY_PATH)/jcdctmgr.c \
$(JPG_LIBRARY_PATH)/jchuff.c \
$(JPG_LIBRARY_PATH)/jcinit.c \
$(JPG_LIBRARY_PATH)/jcmainct.c \
$(JPG_LIBRARY_PATH)/jcmarker.c \
$(JPG_LIBRARY_PATH)/jcmaster.c \
$(JPG_LIBRARY_PATH)/jcomapi.c \
$(JPG_LIBRARY_PATH)/jcparam.c \
$(JPG_LIBRARY_PATH)/jcprepct.c \
$(JPG_LIBRARY_PATH)/jcsample.c \
$(JPG_LIBRARY_PATH)/jctrans.c \
$(JPG_LIBRARY_PATH)/jdapimin.c \
$(JPG_LIBRARY_PATH)/jdapistd.c \
$(JPG_LIBRARY_PATH)/jdarith.c \
$(JPG_LIBRARY_PATH)/jdatadst.c \
$(JPG_LIBRARY_PATH)/jdatasrc.c \
$(JPG_LIBRARY_PATH)/jdcoefct.c \
$(JPG_LIBRARY_PATH)/jdcolor.c \
$(JPG_LIBRARY_PATH)/jddctmgr.c \
$(JPG_LIBRARY_PATH)/jdhuff.c \
$(JPG_LIBRARY_PATH)/jdinput.c \
$(JPG_LIBRARY_PATH)/jdmainct.c \
$(JPG_LIBRARY_PATH)/jdmarker.c \
$(JPG_LIBRARY_PATH)/jdmaster.c \
$(JPG_LIBRARY_PATH)/jdmerge.c \
$(JPG_LIBRARY_PATH)/jdpostct.c \
$(JPG_LIBRARY_PATH)/jdsample.c \
$(JPG_LIBRARY_PATH)/jdtrans.c \
$(JPG_LIBRARY_PATH)/jerror.c \
$(JPG_LIBRARY_PATH)/jfdctflt.c \
$(JPG_LIBRARY_PATH)/jfdctfst.c \
$(JPG_LIBRARY_PATH)/jfdctint.c \
$(JPG_LIBRARY_PATH)/jidctflt.c \
$(JPG_LIBRARY_PATH)/jidctfst.S \
$(JPG_LIBRARY_PATH)/jidctint.c \
$(JPG_LIBRARY_PATH)/jquant1.c \
$(JPG_LIBRARY_PATH)/jquant2.c \
$(JPG_LIBRARY_PATH)/jutils.c \
$(JPG_LIBRARY_PATH)/jmemmgr.c \
$(JPG_LIBRARY_PATH)/jmem-android.c
endif
ifeq ($(SUPPORT_PNG),true)
Jun 2, 2013
Jun 2, 2013
92
93
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(PNG_LIBRARY_PATH)
LOCAL_CFLAGS += -DLOAD_PNG
May 28, 2013
May 28, 2013
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# We can include the sources directly so the user doesn't have to...
#LOCAL_STATIC_LIBRARIES += png
LOCAL_SRC_FILES += \
$(PNG_LIBRARY_PATH)/png.c \
$(PNG_LIBRARY_PATH)/pngerror.c \
$(PNG_LIBRARY_PATH)/pngget.c \
$(PNG_LIBRARY_PATH)/pngmem.c \
$(PNG_LIBRARY_PATH)/pngpread.c \
$(PNG_LIBRARY_PATH)/pngread.c \
$(PNG_LIBRARY_PATH)/pngrio.c \
$(PNG_LIBRARY_PATH)/pngrtran.c \
$(PNG_LIBRARY_PATH)/pngrutil.c \
$(PNG_LIBRARY_PATH)/pngset.c \
$(PNG_LIBRARY_PATH)/pngtrans.c \
$(PNG_LIBRARY_PATH)/pngwio.c \
$(PNG_LIBRARY_PATH)/pngwrite.c \
$(PNG_LIBRARY_PATH)/pngwtran.c \
$(PNG_LIBRARY_PATH)/pngwutil.c
LOCAL_LDLIBS += -lz
endif
May 28, 2013
May 28, 2013
115
ifeq ($(SUPPORT_WEBP),true)
Jun 2, 2013
Jun 2, 2013
116
117
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(WEBP_LIBRARY_PATH)/src
LOCAL_CFLAGS += -DLOAD_WEBP
May 28, 2013
May 28, 2013
118
119
LOCAL_STATIC_LIBRARIES += webp
endif
Jun 17, 2013
Jun 17, 2013
121
122
LOCAL_EXPORT_C_INCLUDES += $(LOCAL_C_INCLUDES)
123
include $(BUILD_SHARED_LIBRARY)