OSDN Git Service

Merge cherrypicks of [2973982, 2974657, 2974658, 2973983, 2973984, 2974689, 2974690...
[android-x86/system-bt.git] / btif / Android.mk
1  ##############################################################################
2  #
3  #  Copyright (C) 2014 Google, Inc.
4  #
5  #  Licensed under the Apache License, Version 2.0 (the "License");
6  #  you may not use this file except in compliance with the License.
7  #  You may obtain a copy of the License at:
8  #
9  #  http://www.apache.org/licenses/LICENSE-2.0
10  #
11  #  Unless required by applicable law or agreed to in writing, software
12  #  distributed under the License is distributed on an "AS IS" BASIS,
13  #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  #  See the License for the specific language governing permissions and
15  #  limitations under the License.
16  #
17  ##############################################################################
18
19 LOCAL_PATH := $(call my-dir)
20
21 # Common variables
22 # ========================================================
23
24 # HAL layer
25 btifCommonSrc := \
26   src/bluetooth.c \
27   ../EventLogTags.logtags
28
29 # BTIF implementation
30 btifCommonSrc += \
31   src/btif_av.c \
32   src/btif_avrcp_audio_track.cpp \
33   src/btif_config.c \
34   src/btif_config_transcode.cpp \
35   src/btif_core.c \
36   src/btif_debug.c \
37   src/btif_debug_btsnoop.c \
38   src/btif_debug_conn.c \
39   src/btif_debug_l2c.c \
40   src/btif_dm.c \
41   src/btif_gatt.c \
42   src/btif_gatt_client.c \
43   src/btif_gatt_multi_adv_util.c \
44   src/btif_gatt_server.c \
45   src/btif_gatt_test.c \
46   src/btif_gatt_util.c \
47   src/btif_hf.c \
48   src/btif_hf_client.c \
49   src/btif_hh.c \
50   src/btif_hl.c \
51   src/btif_sdp.c \
52   src/btif_media_task.c \
53   src/btif_pan.c \
54   src/btif_profile_queue.c \
55   src/btif_rc.c \
56   src/btif_sm.c \
57   src/btif_sock.c \
58   src/btif_sock_rfc.c \
59   src/btif_sock_l2cap.c \
60   src/btif_sock_sco.c \
61   src/btif_sock_sdp.c \
62   src/btif_sock_thread.c \
63   src/btif_sdp_server.c \
64   src/btif_sock_util.c \
65   src/btif_storage.c \
66   src/btif_uid.c \
67   src/btif_util.c \
68   src/stack_manager.c
69
70 # Callouts
71 btifCommonSrc += \
72   co/bta_ag_co.c \
73   co/bta_dm_co.c \
74   co/bta_av_co.c \
75   co/bta_hh_co.c \
76   co/bta_hl_co.c \
77   co/bta_pan_co.c \
78   co/bta_gatts_co.c
79
80 # Tests
81 btifTestSrc := \
82   test/btif_storage_test.cpp
83
84 # Includes
85 btifCommonIncludes := \
86   $(LOCAL_PATH)/../ \
87   $(LOCAL_PATH)/../bta/include \
88   $(LOCAL_PATH)/../bta/sys \
89   $(LOCAL_PATH)/../bta/dm \
90   $(LOCAL_PATH)/../btcore/include \
91   $(LOCAL_PATH)/../include \
92   $(LOCAL_PATH)/../stack/include \
93   $(LOCAL_PATH)/../stack/l2cap \
94   $(LOCAL_PATH)/../stack/a2dp \
95   $(LOCAL_PATH)/../stack/btm \
96   $(LOCAL_PATH)/../stack/avdt \
97   $(LOCAL_PATH)/../hcis \
98   $(LOCAL_PATH)/../hcis/include \
99   $(LOCAL_PATH)/../hcis/patchram \
100   $(LOCAL_PATH)/../udrv/include \
101   $(LOCAL_PATH)/../btif/include \
102   $(LOCAL_PATH)/../btif/co \
103   $(LOCAL_PATH)/../hci/include\
104   $(LOCAL_PATH)/../vnd/include \
105   $(LOCAL_PATH)/../brcm/include \
106   $(LOCAL_PATH)/../embdrv/sbc/encoder/include \
107   $(LOCAL_PATH)/../embdrv/sbc/decoder/include \
108   $(LOCAL_PATH)/../audio_a2dp_hw \
109   $(LOCAL_PATH)/../utils/include \
110   $(bluetooth_C_INCLUDES) \
111   external/tinyxml2 \
112   external/zlib
113
114 # libbtif static library for target
115 # ========================================================
116 include $(CLEAR_VARS)
117 LOCAL_C_INCLUDES := $(btifCommonIncludes)
118 LOCAL_SRC_FILES := $(btifCommonSrc)
119 # Many .h files have redefined typedefs
120 LOCAL_SHARED_LIBRARIES := libcutils liblog
121 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
122 LOCAL_MODULE_TAGS := optional
123 LOCAL_MODULE := libbtif
124
125 LOCAL_CFLAGS += $(bluetooth_CFLAGS) -DBUILDCFG
126 LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
127 LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
128
129 include $(BUILD_STATIC_LIBRARY)
130
131 # btif unit tests for target
132 # ========================================================
133 include $(CLEAR_VARS)
134 LOCAL_C_INCLUDES := $(btifCommonIncludes)
135 LOCAL_SRC_FILES := $(btifTestSrc)
136 LOCAL_SHARED_LIBRARIES += liblog libhardware libhardware_legacy libcutils
137 LOCAL_STATIC_LIBRARIES += libbtcore libbtif libosi
138 LOCAL_MODULE_TAGS := optional
139 LOCAL_MODULE := net_test_btif
140
141 LOCAL_CFLAGS += $(bluetooth_CFLAGS) -DBUILDCFG
142 LOCAL_CONLYFLAGS += $(bluetooth_CONLYFLAGS)
143 LOCAL_CPPFLAGS += $(bluetooth_CPPFLAGS)
144
145 include $(BUILD_NATIVE_TEST)