svc: Helpers
[libsamsung-ipc.git] / Android.mk
1 # This file is part of libsamsung-ipc.
2 #
3 # Copyright (C) 2011-2014 Paul Kocialkowski <contact@paulk.fr>
4 #
5 # libsamsung-ipc is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # libsamsung-ipc is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with libsamsung-ipc.  If not, see <http://www.gnu.org/licenses/>.
17
18 LOCAL_PATH := $(call my-dir)
19
20 include $(CLEAR_VARS)
21
22 ifneq (,$(filter crespo,$(TARGET_DEVICE)))
23         ipc_device_name := crespo
24 endif
25
26 ifneq (,$(filter galaxysmtd galaxytab,$(TARGET_DEVICE)))
27         ipc_device_name := aries
28 endif
29
30 ifneq (,$(filter i9100 galaxys2 n7000,$(TARGET_DEVICE)))
31         ipc_device_name := galaxys2
32 endif
33
34 ifneq (,$(filter maguro,$(TARGET_DEVICE)))
35         ipc_device_name := maguro
36 endif
37
38 ifneq (,$(filter p5100 p3100,$(TARGET_DEVICE)))
39         ipc_device_name := piranha
40 endif
41
42 ifneq (,$(filter i9300,$(TARGET_DEVICE)))
43         ipc_device_name := i9300
44 endif
45
46 ifneq (,$(filter n7100,$(TARGET_DEVICE)))
47         ipc_device_name := n7100
48 endif
49
50 LOCAL_SRC_FILES := \
51         samsung-ipc/ipc.c \
52         samsung-ipc/ipc_devices.c \
53         samsung-ipc/ipc_utils.c \
54         samsung-ipc/devices/xmm616/xmm616.c \
55         samsung-ipc/devices/xmm626/xmm626.c \
56         samsung-ipc/devices/xmm626/xmm626_hsic.c \
57         samsung-ipc/devices/xmm626/xmm626_mipi.c \
58         samsung-ipc/devices/xmm626/xmm626_sec_modem.c \
59         samsung-ipc/devices/crespo/crespo.c \
60         samsung-ipc/devices/aries/aries.c \
61         samsung-ipc/devices/galaxys2/galaxys2.c \
62         samsung-ipc/devices/maguro/maguro.c \
63         samsung-ipc/devices/piranha/piranha.c \
64         samsung-ipc/devices/i9300/i9300.c \
65         samsung-ipc/devices/n7100/n7100.c \
66         samsung-ipc/utils.c \
67         samsung-ipc/call.c \
68         samsung-ipc/sms.c \
69         samsung-ipc/sec.c \
70         samsung-ipc/net.c \
71         samsung-ipc/misc.c \
72         samsung-ipc/svc.c \
73         samsung-ipc/gprs.c \
74         samsung-ipc/rfs.c \
75         samsung-ipc/gen.c
76
77 LOCAL_C_INCLUDES := \
78         $(LOCAL_PATH)/include \
79         $(LOCAL_PATH)/samsung-ipc \
80         $(LOCAL_PATH)/samsung-ipc/devices/xmm616/ \
81         $(LOCAL_PATH)/samsung-ipc/devices/xmm626/ \
82         external/openssl/include
83
84 LOCAL_CFLAGS := \
85         -DIPC_DEVICE_NAME=\"$(ipc_device_name)\" \
86         -DDEBUG
87
88 LOCAL_SHARED_LIBRARIES := libutils libcrypto
89
90 LOCAL_MODULE := libsamsung-ipc
91 LOCAL_MODULE_TAGS := optional
92
93 include $(BUILD_STATIC_LIBRARY)
94
95 include $(CLEAR_VARS)
96
97 LOCAL_SRC_FILES := tools/ipc-modem.c
98
99 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
100
101 LOCAL_STATIC_LIBRARIES := libsamsung-ipc
102 LOCAL_SHARED_LIBRARIES := libutils
103
104 LOCAL_MODULE := ipc-modem
105 LOCAL_MODULE_TAGS := optional
106
107 include $(BUILD_EXECUTABLE)
108
109 include $(CLEAR_VARS)
110
111 LOCAL_SRC_FILES := tools/ipc-test.c
112
113 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
114
115 LOCAL_STATIC_LIBRARIES := libsamsung-ipc
116 LOCAL_SHARED_LIBRARIES := libutils
117
118 LOCAL_MODULE := ipc-test
119 LOCAL_MODULE_TAGS := optional
120
121 include $(BUILD_EXECUTABLE)