2f62e5ba86e660625e9f5630a7ccc9fd809b8158
[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/gprs.c \
73         samsung-ipc/rfs.c \
74         samsung-ipc/gen.c
75
76 LOCAL_C_INCLUDES := \
77         $(LOCAL_PATH)/include \
78         $(LOCAL_PATH)/samsung-ipc \
79         $(LOCAL_PATH)/samsung-ipc/devices/xmm616/ \
80         $(LOCAL_PATH)/samsung-ipc/devices/xmm626/ \
81         external/openssl/include
82
83 LOCAL_CFLAGS := \
84         -DIPC_DEVICE_NAME=\"$(ipc_device_name)\" \
85         -DDEBUG
86
87 LOCAL_SHARED_LIBRARIES := libutils libcrypto
88
89 LOCAL_MODULE := libsamsung-ipc
90 LOCAL_MODULE_TAGS := optional
91
92 include $(BUILD_STATIC_LIBRARY)
93
94 include $(CLEAR_VARS)
95
96 LOCAL_SRC_FILES := tools/ipc-modem.c
97
98 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
99
100 LOCAL_STATIC_LIBRARIES := libsamsung-ipc
101 LOCAL_SHARED_LIBRARIES := libutils
102
103 LOCAL_MODULE := ipc-modem
104 LOCAL_MODULE_TAGS := optional
105
106 include $(BUILD_EXECUTABLE)
107
108 include $(CLEAR_VARS)
109
110 LOCAL_SRC_FILES := tools/ipc-test.c
111
112 LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
113
114 LOCAL_STATIC_LIBRARIES := libsamsung-ipc
115 LOCAL_SHARED_LIBRARIES := libutils
116
117 LOCAL_MODULE := ipc-test
118 LOCAL_MODULE_TAGS := optional
119
120 include $(BUILD_EXECUTABLE)