135f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat#
235f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# Copyright 2015 The Android Open Source Project
335f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat#
435f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# Licensed under the Apache License, Version 2.0 (the "License");
535f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# you may not use this file except in compliance with the License.
635f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# You may obtain a copy of the License at
735f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat#
835f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat#      http://www.apache.org/licenses/LICENSE-2.0
935f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat#
1035f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# Unless required by applicable law or agreed to in writing, software
1135f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# distributed under the License is distributed on an "AS IS" BASIS,
1235f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1335f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# See the License for the specific language governing permissions and
1435f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# limitations under the License.
1535f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat#
1635f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat
1735f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel EratLOCAL_PATH := $(my-dir)
1835f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat
1935f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# libwebserv shared library
2035f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat# ========================================================
2135f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat
2235f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Eratinclude $(CLEAR_VARS)
2335f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel EratLOCAL_MODULE := libwebserv
24e08d45c4408289a1f69cb54d0b4ae12830e30180Daniel EratLOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/..
25d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_SHARED_LIBRARIES :=
2635f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel EratLOCAL_SRC_FILES := \
2734bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley    dbus_bindings/org.chromium.WebServer.RequestHandler.dbus-xml \
2835f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat    protocol_handler.cc \
2935f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat    request.cc \
3035f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat    request_handler_callback.cc \
31c70c04e8d1b3a3f0d27b0cf5710cb9d34b1e77b4Alex Vakulenko    request_utils.cc \
3235f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat    response.cc \
3335f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat    server.cc \
3435f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat
35d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyifeq ($(system_webservd_use_dbus),true)
36d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_SHARED_LIBRARIES += libwebservd-client-internal
37d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_SRC_FILES += \
38d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley    dbus_protocol_handler.cc \
39d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley    dbus_server.cc
40d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyendif
41d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
42d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyifeq ($(system_webservd_use_binder),true)
43d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_SHARED_LIBRARIES += libwebserv-binder-internal
44d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_SRC_FILES += \
45d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley    binder_server.cc
46d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyendif
47d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
4835f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Erat$(eval $(webservd_common))
49ff0ff9593624f96bdb1a99af9031ca6c43a54381Christopher Wiley$(eval $(webservd_common_libraries))
5035f6587840b71c8bd3e3655508b6f05cb2593ba9Daniel Eratinclude $(BUILD_SHARED_LIBRARY)
5134bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley
5234bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley# libwebserv-proxies-internal shared library
5334bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley# ========================================================
5434bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley# You do not want to depend on this.  Depend on libwebserv instead.
5534bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley# libwebserv abstracts and helps you consume this interface.
56d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley#
57d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley# This library builds the proxies which webservd will use to communicate back
58d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley# to libwebservd over DBus.
59d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyifeq ($(system_webservd_use_dbus),true)
6034bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wileyinclude $(CLEAR_VARS)
6134bc9df555456b0deab01296b1518dcc4cc3eadaChristopher WileyLOCAL_MODULE := libwebserv-proxies-internal
62d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
6334bc9df555456b0deab01296b1518dcc4cc3eadaChristopher WileyLOCAL_SRC_FILES := \
6434bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley    dbus_bindings/org.chromium.WebServer.RequestHandler.dbus-xml \
6534bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wiley
6634bc9df555456b0deab01296b1518dcc4cc3eadaChristopher WileyLOCAL_DBUS_PROXY_PREFIX := libwebserv
67d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
68d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley$(eval $(webservd_common))
69d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley$(eval $(webservd_common_libraries))
70d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyinclude $(BUILD_SHARED_LIBRARY)
71d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyendif
72d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
73d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
74d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley# libwebserv-binder-internal shared library
75d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley# ========================================================
76d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley# You do not want to depend on this.  Depend on libwebserv instead.
77d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley# libwebserv abstracts and helps you consume this interface.
78d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley#
79d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley# This library builds the binder interfaces used between webservd and libwebserv
80d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyifeq ($(system_webservd_use_binder),true)
81d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyinclude $(CLEAR_VARS)
82d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_MODULE := libwebserv-binder-internal
83d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
84d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_SRC_FILES += \
85d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley    ../aidl/android/webservd/IServer.aidl \
86d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley    ../aidl/android/webservd/IProtocolHandler.aidl \
87d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley    binder_constants.cc
88d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley
89d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher WileyLOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/../aidl
90d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley$(eval $(webservd_common))
91d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wiley$(eval $(webservd_common_libraries))
9234bc9df555456b0deab01296b1518dcc4cc3eadaChristopher Wileyinclude $(BUILD_SHARED_LIBRARY)
93d6197ec257b6ae5233e99f775cfeb2f368bb9391Christopher Wileyendif
94