SRS: srs-client library, proper structures for protocol data
[samsung-ril.git] / Android.mk
1 # This file is part of samsung-ril.
2 #
3 # Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
4 # Copyright (C) 2011-2012 Paul Kocialkowski <contact@paulk.fr>
5 #
6 # samsung-ril is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # samsung-ril is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with samsung-ril.  If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 LOCAL_PATH := $(call my-dir)
21 include $(CLEAR_VARS)
22
23 LOCAL_SRC_FILES := \
24         samsung-ril.c \
25         client.c \
26         ipc.c \
27         srs.c \
28         util.c \
29         gen.c \
30         pwr.c \
31         disp.c \
32         misc.c \
33         sat.c \
34         ss.c \
35         sec.c \
36         net.c \
37         sms.c \
38         call.c \
39         snd.c \
40         gprs.c \
41         rfs.c
42
43 LOCAL_SHARED_LIBRARIES := \
44         libcutils libutils libril liblog
45
46 LOCAL_STATIC_LIBRARIES := libsamsung-ipc
47
48 # for asprinf
49 LOCAL_CFLAGS := -D_GNU_SOURCE
50
51 # Disable STK
52 LOCAL_CFLAGS += -DDISABLE_STK
53
54 ifeq ($(TARGET_DEVICE),crespo)
55         LOCAL_CFLAGS += -DDEVICE_IPC_V4
56         samsung-ipc_device := crespo
57 endif
58
59 ifeq ($(TARGET_DEVICE),galaxysmtd)
60         LOCAL_CFLAGS += -DDEVICE_IPC_V4
61         samsung-ipc_device := aries
62 endif
63
64 ifeq ($(TARGET_DEVICE),galaxys2)
65         LOCAL_CFLAGS += -DDEVICE_IPC_V4
66         samsung-ipc_device := galaxys2
67 endif
68
69 ifeq ($(TARGET_DEVICE),galaxytab)
70         LOCAL_CFLAGS += -DDEVICE_IPC_V4
71         samsung-ipc_device := aries
72 endif
73
74 ifeq ($(TARGET_DEVICE),h1)
75         LOCAL_CFLAGS += -DDEVICE_H1
76 endif
77
78 ifeq ($(TARGET_DEVICE),maguro)
79         LOCAL_CFLAGS += -DDEVICE_IPC_V4
80         samsung-ipc_device := maguro
81 endif
82
83 ifeq ($(TARGET_DEVICE),p5100)
84         LOCAL_CFLAGS += -DDEVICE_IPC_V4
85         samsung-ipc_device := espresso10
86 endif
87
88 ifeq ($(TARGET_DEVICE),p3100)
89         LOCAL_CFLAGS += -DDEVICE_IPC_V4
90         samsung-ipc_device := espresso
91 endif
92
93 LOCAL_C_INCLUDES := external/libsamsung-ipc/include
94 LOCAL_C_INCLUDES += hardware/ril/libsamsung-ipc/include
95 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
96
97 LOCAL_MODULE_TAGS := optional
98
99 LOCAL_PRELINK_MODULE := false
100
101 ifeq (foo,foo)
102         # build shared library
103         LOCAL_SHARED_LIBRARIES += \
104                 libcutils libnetutils libutils liblog
105         LOCAL_LDLIBS += -lpthread
106         LOCAL_CFLAGS += -DRIL_SHLIB
107         LOCAL_MODULE:= libsamsung-ril
108         include $(BUILD_SHARED_LIBRARY)
109 else
110         # build executable
111         LOCAL_SHARED_LIBRARIES += \
112                 libril
113         LOCAL_MODULE:= samsung-ril
114         include $(BUILD_EXECUTABLE)
115 endif
116
117 include $(CLEAR_VARS)
118
119 LOCAL_SRC_FILES := srs-client/srs-client.c
120
121 LOCAL_C_INCLUDES := \
122         $(LOCAL_PATH)/include \
123         $(LOCAL_PATH)/srs-client/include \
124
125 LOCAL_SHARED_LIBRARIES := liblog libcutils
126
127 LOCAL_PRELINK_MODULE := false
128 LOCAL_MODULE_TAGS := optional
129 LOCAL_MODULE := libsrs-client
130
131 include $(BUILD_SHARED_LIBRARY)