Device detection mechanism improvments and more constitant devices naming
[libsamsung-ipc.git] / Android.mk
1 LOCAL_PATH:= $(call my-dir)
2 include $(CLEAR_VARS)
3
4 DEBUG := true
5
6 LOCAL_MODULE := libsamsung-ipc
7 LOCAL_MODULE_TAGS := optional
8
9 LOCAL_C_INCLUDES := external/openssl/include
10 LOCAL_LDFLAGS += -lcrypto
11
12 ifneq (,$(filter crespo,$(TARGET_DEVICE)))
13         ipc_device_name := crespo
14 endif
15
16 ifneq (,$(filter galaxysmtd galaxytab,$(TARGET_DEVICE)))
17         ipc_device_name := aries
18 endif
19
20 ifneq (,$(filter maguro,$(TARGET_DEVICE)))
21         ipc_device_name := maguro
22 endif
23
24 ifneq (,$(filter p5100 p3100,$(TARGET_DEVICE)))
25         ipc_device_name := piranha
26 endif
27
28 ifneq (,$(filter i9100 galaxys2 n7000,$(TARGET_DEVICE)))
29         ipc_device_name := galaxys2
30 endif
31
32 ifneq (,$(filter i9300,$(TARGET_DEVICE)))
33         ipc_device_name := i9300
34 endif
35
36 ifeq ($(DEBUG),true)
37         LOCAL_CFLAGS += -DDEBUG
38         LOCAL_CFLAGS += -DLOG_STDOUT
39 endif
40
41 samsung-ipc_files := \
42         samsung-ipc/ipc.c \
43         samsung-ipc/ipc_util.c \
44         samsung-ipc/ipc_devices.c \
45         samsung-ipc/call.c \
46         samsung-ipc/rfs.c \
47         samsung-ipc/gen.c \
48         samsung-ipc/gprs.c \
49         samsung-ipc/misc.c \
50         samsung-ipc/net.c \
51         samsung-ipc/sec.c \
52         samsung-ipc/sms.c \
53         samsung-ipc/util.c \
54         samsung-ipc/device/xmm6160/xmm6160.c \
55         samsung-ipc/device/xmm6260/xmm6260.c \
56         samsung-ipc/device/xmm6260/xmm6260_hsic.c \
57         samsung-ipc/device/xmm6260/xmm6260_mipi.c \
58         samsung-ipc/device/xmm6260/xmm6260_sec_modem.c \
59         samsung-ipc/device/crespo/crespo_ipc.c \
60         samsung-ipc/device/aries/aries_ipc.c \
61         samsung-ipc/device/galaxys2/galaxys2_ipc.c \
62         samsung-ipc/device/i9300/i9300_ipc.c \
63         samsung-ipc/device/maguro/maguro_ipc.c \
64         samsung-ipc/device/piranha/piranha_ipc.c
65
66 LOCAL_SRC_FILES := $(samsung-ipc_files)
67 LOCAL_CFLAGS += -DIPC_DEVICE_NAME=\"$(ipc_device_name)\"
68
69 LOCAL_SHARED_LIBRARIES := libutils
70 LOCAL_C_INCLUDES += \
71         $(LOCAL_PATH)/include \
72         $(LOCAL_PATH)/samsung-ipc \
73         $(LOCAL_PATH)/samsung-ipc/device/xmm6160/ \
74         $(LOCAL_PATH)/samsung-ipc/device/xmm6260/
75
76 include $(BUILD_STATIC_LIBRARY)
77
78 include $(CLEAR_VARS)
79
80 LOCAL_MODULE := ipc-modemctrl
81 LOCAL_MODULE_TAGS := optional
82
83 ifeq ($(DEBUG),true)
84         LOCAL_CFLAGS += -DDEBUG
85         LOCAL_CFLAGS += -DLOG_STDOUT
86 endif
87
88 modemctrl_files := tools/modemctrl.c
89
90 LOCAL_SRC_FILES := $(modemctrl_files)
91
92 LOCAL_STATIC_LIBRARIES := libsamsung-ipc
93 LOCAL_SHARED_LIBRARIES := libutils
94 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
95
96 include $(BUILD_EXECUTABLE)