aboutsummaryrefslogtreecommitdiff
path: root/daemon/Android.mk
blob: 935ee62505b335b2e746bd07e606f1b1586dfe06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#
# Copyright (C) 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)

peripheralman_CommonCFlags := -Wall -Werror -Wno-unused-parameter
peripheralman_CommonCFlags += -Wno-sign-promo  # for libchrome
peripheralman_CommonCIncludes := \
  $(LOCAL_PATH)/../common \
  $(LOCAL_PATH)/../include \
  external/gtest/include \

peripheralman_CommonSharedLibraries := \
  libbinder \
  libbinderwrapper \
  libchrome \
  libutils \
  libhardware \

libperipheralman_internal_CommonSources := \
  char_device.cc \
  gpio_driver_sysfs.cc \
  gpio_manager.cc \
  i2c_driver_i2cdev.cc \
  i2c_manager.cc \
  led_driver_sysfs.cc \
  led_manager.cc \
  peripheral_manager.cc \
  peripheral_manager_client.cc \
  pin_mux_manager.cc \
  spi_driver_spidev.cc \
  spi_manager.cc \
  uart_driver_sysfs.cc \
  uart_manager.cc \

# peripheralman executable
# ========================================================

include $(CLEAR_VARS)
LOCAL_MODULE := peripheralman
LOCAL_REQUIRED_MODULES := peripheralman.rc
LOCAL_CPP_EXTENSION := .cc
LOCAL_CFLAGS := $(peripheralman_CommonCFlags)
LOCAL_C_INCLUDES := $(peripheralman_CommonCIncludes)

LOCAL_STATIC_LIBRARIES := \
  libperipheralman_internal \
  libperipheralman_binder \
  peripheral_manager_hal_headers \

LOCAL_SHARED_LIBRARIES := \
  $(peripheralman_CommonSharedLibraries) \
  libbrillo \
  libbrillo-binder \

LOCAL_SRC_FILES := main.cc
LOCAL_INIT_RC := peripheralman.rc
include $(BUILD_EXECUTABLE)

# libperipheralman_internal static lib
# ========================================================

include $(CLEAR_VARS)
LOCAL_MODULE := libperipheralman_internal
LOCAL_CPP_EXTENSION := .cc
LOCAL_CFLAGS := $(peripheralman_CommonCFlags)
LOCAL_C_INCLUDES := $(peripheralman_CommonCIncludes)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include
LOCAL_STATIC_LIBRARIES := \
  libperipheralman_binder \
  peripheral_manager_hal_headers \

LOCAL_SHARED_LIBRARIES := \
  $(peripheralman_CommonSharedLibraries) \

LOCAL_SRC_FILES := $(libperipheralman_internal_CommonSources)
include $(BUILD_STATIC_LIBRARY)

# libperipheral_internal_test static lib used to test the client.
# ===============================================================

include $(CLEAR_VARS)
LOCAL_MODULE := libperipheralman_internal_test
LOCAL_CPP_EXTENSION := .cc
LOCAL_CFLAGS := $(peripheralman_CommonCFlags)
LOCAL_C_INCLUDES := $(peripheralman_CommonCIncludes)
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/../include \
  $(LOCAL_PATH) \
  $(LOCAL_PATH)/../hal \

LOCAL_STATIC_LIBRARIES := \
  libperipheralman_binder \
  peripheral_manager_hal_headers \

LOCAL_SHARED_LIBRARIES := \
  libbinder \
  libbinderwrapper_test_support \
  libchrome \
  libutils \
  libhardware \

LOCAL_SRC_FILES := $(libperipheralman_internal_CommonSources) \
  fake_devices.cc \
  fake_i2c_devices.cc \

include $(BUILD_STATIC_LIBRARY)

# peripheralman unit tests
# ========================================================
include $(CLEAR_VARS)
LOCAL_MODULE := peripheralman_unittests
LOCAL_CPP_EXTENSION := .cc
LOCAL_CFLAGS := $(peripheralman_CommonCFlags)
LOCAL_C_INCLUDES := $(peripheralman_CommonCIncludes)
LOCAL_STATIC_LIBRARIES := libperipheralman_internal \
  peripheral_manager_hal_headers \

LOCAL_SHARED_LIBRARIES := \
  libchrome \

LOCAL_SRC_FILES := \
  fake_devices.cc \
  fake_i2c_devices.cc \
  gpio_manager_unittest.cc \
  pin_mux_manager_unittest.cc \
  spi_manager_unittest.cc \

include $(BUILD_NATIVE_TEST)