forked from corecodec/coremake
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathandroid_mk.inc
112 lines (104 loc) · 2.13 KB
/
android_mk.inc
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
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
IF %(TYPE)==DLL || %(TYPE)==LIB
PRINTNL
PRINTNL include $(CLEAR_VARS)
PRINTNL LOCAL_MODULE := %(NAME)
IF %(TARGARCH)=="arm"
PRINTNL LOCAL_ARM_MODE := arm
ENDIF
PRINTNL LOCAL_SRC_FILES := \
FOR EACH SOURCE
IF %(FOR_LAST)
PRINTNL %(!NAME)
ELSE
PRINTNL %(!NAME) \
ENDIF
ENDFOR
PRINTNL
DLL_DEPS =
LIB_DEPS =
FOR EACH USE
IF %(TYPE)==DLL
../DLL_DEPS += %(NAME)
ELSE
../LIB_DEPS += %(NAME)
ENDIF
ENDFOR
IF %(DLL_DEPS)!=""
PRINTNL LOCAL_SHARED_LIBRARIES := \
FOR EACH DLL_DEPS
IF %(FOR_LAST)
PRINTNL %(NAME)
ELSE
PRINTNL %(NAME) \
ENDIF
ENDFOR
PRINTNL
ENDIF
IF %(LIB_DEPS)!=""
PRINTNL LOCAL_STATIC_LIBRARIES := \
FOR EACH LIB_DEPS
IF %(NAME)!=""
IF %(FOR_LAST)
PRINTNL %(NAME)
ELSE
PRINTNL %(NAME) \
ENDIF
ENDIF
ENDFOR
PRINTNL
ENDIF
IF %(SYSLIBS)!="" && %(TYPE)==DLL
PRINTNL LOCAL_LDLIBS := \
FOR EACH SYSLIBS
IF %(NAME)!=""
IF %(FOR_LAST)
PRINTNL -l%(NAME)
ELSE
PRINTNL -l%(NAME) \
ENDIF
ENDIF
ENDFOR
PRINTNL
ENDIF
// the include folders are relative to project root
FOR EACH INCLUDE
../USERINCLUDE += %(|NAME)
ENDFOR
FOR EACH EXPINCLUDE
../USERINCLUDE += %(|NAME)
ENDFOR
FOR EACH SUBINCLUDE
../USERINCLUDE += %(|NAME)
ENDFOR
DIRPUSH ..
PRINTNL LOCAL_C_INCLUDES := \
FOR EACH USERINCLUDE
PRINTNL %(!§NAME) \
ENDFOR
PRINTNL %(@&CONFIG_INCLUDE:%= %)
DIRPOP
PRINTNL
IF %(DEFINE)!=""
PRINTNL LOCAL_CFLAGS := %(DEFINE:%=-D%)
ENDIF
IF %(TYPE)==DLL
IF %(LIBS)!=""
PRINTNL LOCAL_LDLIBS += \
FOR EACH LIBS
IF %(NAME)!=""
IF %(FOR_LAST)
PRINTNL -l%(NAME)
ELSE
PRINTNL -l%(NAME) \
ENDIF
ENDIF
ENDFOR
PRINTNL
ENDIF
PRINTNL LOCAL_LDFLAGS += -nostdlib
PRINTNL include $(BUILD_SHARED_LIBRARY)
ELSE
PRINTNL include $(BUILD_STATIC_LIBRARY)
ENDIF
PRINTNL
ENDIF