aboutsummaryrefslogtreecommitdiffstats
path: root/Android.mk
blob: c0a5d3585a1f86a0ec344c8070662be3f0196047 (plain)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# This file is part of libsamsung-ipc.
#
# Copyright (C) 2011-2014 Paul Kocialkowski <contact@paulk.fr>
#
# libsamsung-ipc is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# libsamsung-ipc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.

LOCAL_PATH := $(call my-dir)

ifneq (,$(filter galaxysmtd galaxytab,$(TARGET_DEVICE)))
	ipc_device_name := aries
endif

ifneq (,$(filter crespo,$(TARGET_DEVICE)))
	ipc_device_name := crespo
endif

ifneq (,$(filter herolte,$(TARGET_DEVICE)))
	ipc_device_name := herolte
endif

ifneq (,$(filter i9100 galaxys2 n7000,$(TARGET_DEVICE)))
	ipc_device_name := galaxys2
endif

ifneq (,$(filter i9300,$(TARGET_DEVICE)))
	ipc_device_name := i9300
endif

ifneq (,$(filter maguro,$(TARGET_DEVICE)))
	ipc_device_name := maguro
endif

ifneq (,$(filter n5100,$(TARGET_DEVICE)))
	ipc_device_name := n5100
endif

ifneq (,$(filter n7100,$(TARGET_DEVICE)))
	ipc_device_name := n7100
endif

ifneq (,$(filter p5100 p3100 espresso3g,$(TARGET_DEVICE)))
	ipc_device_name := piranha
endif

libsamsung_ipc_local_src_files := \
	samsung-ipc/call.c \
	samsung-ipc/gen.c \
	samsung-ipc/gprs.c \
	samsung-ipc/ipc.c \
	samsung-ipc/ipc_utils.c \
	samsung-ipc/misc.c \
	samsung-ipc/net.c \
	samsung-ipc/rfs.c \
	samsung-ipc/sec.c \
	samsung-ipc/sms.c \
	samsung-ipc/svc.c \
	samsung-ipc/utils.c \
	samsung-ipc/devices/ipc_devices.c \
	samsung-ipc/devices/aries/aries.c \
	samsung-ipc/devices/crespo/crespo.c \
	samsung-ipc/devices/galaxys2/galaxys2.c \
	samsung-ipc/devices/herolte/herolte.c \
	samsung-ipc/devices/i9300/i9300.c \
	samsung-ipc/devices/maguro/maguro.c \
	samsung-ipc/devices/n5100/n5100.c \
	samsung-ipc/devices/n7100/n7100.c \
	samsung-ipc/devices/piranha/piranha.c \
	samsung-ipc/modems/xmm616/xmm616.c \
	samsung-ipc/modems/xmm626/xmm626.c \
	samsung-ipc/modems/xmm626/xmm626_hsic.c \
	samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c \
	samsung-ipc/modems/xmm626/xmm626_mipi.c \
	samsung-ipc/partitions/android/android.c \
	samsung-ipc/partitions/toc/toc.c

libsamsung_ipc_local_export_headers := \
	include/call.h \
	include/disp.h \
	include/gen.h \
	include/gprs.h \
	include/imei.h \
	include/misc.h \
	include/net.h \
	include/pb.h \
	include/protocol.h \
	include/pwr.h \
	include/rfs.h \
	include/samsung-ipc.h \
	include/sat.h \
	include/sec.h \
	include/sms.h \
	include/snd.h \
	include/ss.h \
	include/svc.h \

local_export_c_include_dirs := \
	$(LOCAL_PATH)/include

libsamsung_ipc_local_c_includes := \
	$(LOCAL_PATH)/include \
	$(LOCAL_PATH)/samsung-ipc \
	external/openssl/include

libsamsung_local_cflags := \
	-DIPC_DEVICE_NAME=\"$(ipc_device_name)\" \
	-DDEBUG

libsamsung_ipc_local_shared_libraries := \
	libutils \
	libcrypto

############################################
# Static library version of libsamsung-ipc #
############################################
include $(CLEAR_VARS)
include $(LOCAL_PATH)/android_versions.mk

LOCAL_MODULE := libsamsung-ipc
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(libsamsung_ipc_local_src_files)

LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes)

LOCAL_CFLAGS := $(libsamsung_local_cflags)
LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(local_export_c_include_dirs)

include $(BUILD_STATIC_LIBRARY)

############################################
# Shared library version of libsamsung-ipc #
############################################
include $(CLEAR_VARS)
include $(LOCAL_PATH)/android_versions.mk

LOCAL_MODULE := libsamsung-ipc
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(libsamsung_ipc_local_src_files)

LOCAL_C_INCLUDES := $(libsamsung_ipc_local_c_includes)

LOCAL_CFLAGS := $(libsamsung_local_cflags)
LOCAL_SHARED_LIBRARIES := $(libsamsung_ipc_local_shared_libraries)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(local_export_c_include_dirs)

include $(BUILD_SHARED_LIBRARY)

##################
# ipc-modem tool #
##################
include $(CLEAR_VARS)
include $(LOCAL_PATH)/android_versions.mk

LOCAL_MODULE := ipc-modem
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := tools/ipc-modem.c

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_SHARED_LIBRARIES := libsamsung-ipc

include $(BUILD_EXECUTABLE)

#################
# ipc-test tool #
#################
include $(CLEAR_VARS)
include $(LOCAL_PATH)/android_versions.mk

LOCAL_MODULE := ipc-test
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := tools/ipc-test.c

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include

LOCAL_SHARED_LIBRARIES := libsamsung-ipc

include $(BUILD_EXECUTABLE)

#####################
# nv_data-imei tool #
#####################
include $(CLEAR_VARS)
include $(LOCAL_PATH)/android_versions.mk

LOCAL_MODULE := nv_data-imei
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := tools/nv_data-imei.c

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/tools/include/glibc

LOCAL_SHARED_LIBRARIES := libsamsung-ipc

include $(BUILD_EXECUTABLE)

####################
# nv_data-md5 tool #
####################
include $(CLEAR_VARS)
include $(LOCAL_PATH)/android_versions.mk

LOCAL_MODULE := nv_data-md5
LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := tools/nv_data-md5.c

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include

LOCAL_SHARED_LIBRARIES := libsamsung-ipc

include $(BUILD_EXECUTABLE)