514240b1be43ba285b45466340f2a647599907d7
[libsamsung-ipc.git] / Android.mk
1 BUILD_IPC-MODEMCTRL := true
2 DEBUG := true
3
4 LOCAL_PATH:= $(call my-dir)
5 include $(CLEAR_VARS)
6
7 LOCAL_MODULE := libsamsung-ipc
8 LOCAL_MODULE_TAGS := optional
9
10 LOCAL_C_INCLUDES := external/openssl/include
11 LOCAL_LDFLAGS += -lcrypto
12
13 ifeq ($(TARGET_DEVICE),crespo)
14         board_name := herring
15 endif
16
17 ifeq ($(TARGET_DEVICE),galaxysmtd)
18         board_name := aries
19 endif
20
21 ifeq ($(TARGET_DEVICE),galaxytab)
22         board_name := gt-p1000
23 endif
24
25 ifeq ($(TARGET_DEVICE),maguro)
26         board_name := tuna
27 endif
28
29 ifeq ($(TARGET_DEVICE),p5100)
30         board_name := espresso10
31 endif
32
33 ifeq ($(TARGET_DEVICE),p3100)
34         board_name := espresso
35 endif
36
37 ifeq ($(TARGET_DEVICE),i9100)
38         board_name := smdk4210
39 endif
40
41 ifeq ($(TARGET_DEVICE),galaxys2)
42         board_name := smdk4210
43 endif
44
45 ifeq ($(TARGET_DEVICE),i9300)
46         board_name := smdk4x12
47 endif
48
49 ifeq ($(TARGET_DEVICE),galaxys3)
50         board_name := smdk4x12
51 endif
52
53 ifeq ($(DEBUG),true)
54         LOCAL_CFLAGS += -DDEBUG
55         LOCAL_CFLAGS += -DLOG_STDOUT
56 endif
57
58 samsung-ipc_files := \
59         samsung-ipc/ipc.c \
60         samsung-ipc/ipc_util.c \
61         samsung-ipc/ipc_devices.c \
62         samsung-ipc/call.c \
63         samsung-ipc/rfs.c \
64         samsung-ipc/gen.c \
65         samsung-ipc/gprs.c \
66         samsung-ipc/misc.c \
67         samsung-ipc/net.c \
68         samsung-ipc/sec.c \
69         samsung-ipc/sms.c \
70         samsung-ipc/util.c \
71         samsung-ipc/device/xmm6160/xmm6160.c \
72         samsung-ipc/device/xmm6260/xmm6260.c \
73         samsung-ipc/device/xmm6260/xmm6260_hsic.c \
74         samsung-ipc/device/xmm6260/xmm6260_mipi.c \
75         samsung-ipc/device/xmm6260/xmm6260_sec_modem.c \
76         samsung-ipc/device/crespo/crespo_ipc.c \
77         samsung-ipc/device/aries/aries_ipc.c \
78         samsung-ipc/device/galaxys2/galaxys2_ipc.c \
79         samsung-ipc/device/galaxys3/galaxys3_ipc.c \
80         samsung-ipc/device/maguro/maguro_ipc.c \
81         samsung-ipc/device/piranha/piranha_ipc.c
82
83 LOCAL_SRC_FILES := $(samsung-ipc_files)
84 LOCAL_CFLAGS += -DIPC_BOARD_NAME_EXPLICIT=\"$(board_name)\"
85
86 LOCAL_SHARED_LIBRARIES := libutils
87 LOCAL_C_INCLUDES += \
88         $(LOCAL_PATH)/include \
89         $(LOCAL_PATH)/samsung-ipc \
90         $(LOCAL_PATH)/samsung-ipc/device/xmm6160/ \
91         $(LOCAL_PATH)/samsung-ipc/device/xmm6260/
92
93 include $(BUILD_STATIC_LIBRARY)
94
95 ifeq ($(BUILD_IPC-MODEMCTRL),true)
96
97 include $(CLEAR_VARS)
98
99 LOCAL_MODULE := ipc-modemctrl
100 LOCAL_MODULE_TAGS := optional
101
102 ifeq ($(DEBUG),true)
103         LOCAL_CFLAGS += -DDEBUG
104         LOCAL_CFLAGS += -DLOG_STDOUT
105 endif
106
107 modemctrl_files := tools/modemctrl.c
108
109 LOCAL_SRC_FILES := $(modemctrl_files)
110
111 LOCAL_STATIC_LIBRARIES := libsamsung-ipc
112 LOCAL_SHARED_LIBRARIES := libutils
113 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
114
115 include $(BUILD_EXECUTABLE)
116
117 endif