Fix compilation on jellybean
[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 Paul Kocialkowski <contact@oaulk.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 ifeq ($(TARGET_DEVICE),crespo)
52         LOCAL_CFLAGS += -DDEVICE_IPC_V4
53         samsung-ipc_device := crespo
54 endif
55
56 ifeq ($(TARGET_DEVICE),galaxysmtd)
57         LOCAL_CFLAGS += -DDEVICE_IPC_V4
58         samsung-ipc_device := aries
59 endif
60
61 ifeq ($(TARGET_DEVICE),galaxys2)
62         LOCAL_CFLAGS += -DDEVICE_IPC_V4
63         LOCAL_CFLAGS += -DRIL_REQUEST_REGISTRATION_STATE=RIL_REQUEST_VOICE_REGISTRATION_STATE
64         LOCAL_CFLAGS += -DRIL_REQUEST_GPRS_REGISTRATION_STATE=RIL_REQUEST_DATA_REGISTRATION_STATE
65         LOCAL_CFLAGS += -DRIL_SignalStrength=RIL_SignalStrength_v5
66         LOCAL_CFLAGS += -DRIL_CardStatus=RIL_CardStatus_v5
67         LOCAL_CFLAGS += -DRIL_SIM_IO=RIL_SIM_IO_v5
68         LOCAL_CFLAGS += -DRIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED=RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
69         samsung-ipc_device := galaxys2
70 endif
71
72 ifeq ($(TARGET_DEVICE),galaxytab)
73         LOCAL_CFLAGS += -DDEVICE_IPC_V4
74         samsung-ipc_device := aries
75 endif
76
77 ifeq ($(TARGET_DEVICE),h1)
78         LOCAL_CFLAGS += -DDEVICE_H1
79 endif
80
81 ifeq ($(TARGET_DEVICE),maguro)
82         LOCAL_CFLAGS += -DDEVICE_IPC_V4
83         LOCAL_CFLAGS += -DRIL_REQUEST_REGISTRATION_STATE=RIL_REQUEST_VOICE_REGISTRATION_STATE
84         LOCAL_CFLAGS += -DRIL_REQUEST_GPRS_REGISTRATION_STATE=RIL_REQUEST_DATA_REGISTRATION_STATE
85         LOCAL_CFLAGS += -DRIL_SignalStrength=RIL_SignalStrength_v5
86         LOCAL_CFLAGS += -DRIL_CardStatus=RIL_CardStatus_v5
87         LOCAL_CFLAGS += -DRIL_SIM_IO=RIL_SIM_IO_v5
88         LOCAL_CFLAGS += -DRIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED=RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
89         samsung-ipc_device := maguro
90 endif
91
92 LOCAL_C_INCLUDES := external/libsamsung-ipc/include
93 LOCAL_C_INCLUDES += hardware/ril/libsamsung-ipc/include
94 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
95
96 LOCAL_MODULE_TAGS := optional
97
98 LOCAL_PRELINK_MODULE := false
99
100 ifeq (foo,foo)
101         # build shared library
102         LOCAL_SHARED_LIBRARIES += \
103                 libcutils libnetutils libutils liblog
104         LOCAL_LDLIBS += -lpthread
105         LOCAL_CFLAGS += -DRIL_SHLIB
106         LOCAL_MODULE:= libsamsung-ril
107         include $(BUILD_SHARED_LIBRARY)
108 else
109         # build executable
110         LOCAL_SHARED_LIBRARIES += \
111                 libril
112         LOCAL_MODULE:= samsung-ril
113         include $(BUILD_EXECUTABLE)
114 endif