Home | History | Annotate | Download | only in libwebserv
      1 #
      2 # Copyright 2015 The Android Open Source Project
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 #
     16 
     17 LOCAL_PATH := $(my-dir)
     18 
     19 # libwebserv shared library
     20 # ========================================================
     21 
     22 include $(CLEAR_VARS)
     23 LOCAL_MODULE := libwebserv
     24 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/..
     25 LOCAL_SHARED_LIBRARIES :=
     26 LOCAL_SRC_FILES := \
     27     dbus_bindings/org.chromium.WebServer.RequestHandler.dbus-xml \
     28     protocol_handler.cc \
     29     request.cc \
     30     request_handler_callback.cc \
     31     request_utils.cc \
     32     response.cc \
     33     server.cc \
     34 
     35 ifeq ($(system_webservd_use_dbus),true)
     36 LOCAL_SHARED_LIBRARIES += libwebservd-client-internal
     37 LOCAL_SRC_FILES += \
     38     dbus_protocol_handler.cc \
     39     dbus_server.cc
     40 endif
     41 
     42 ifeq ($(system_webservd_use_binder),true)
     43 LOCAL_SHARED_LIBRARIES += libwebserv-binder-internal
     44 LOCAL_SRC_FILES += \
     45     binder_server.cc
     46 endif
     47 
     48 $(eval $(webservd_common))
     49 $(eval $(webservd_common_libraries))
     50 include $(BUILD_SHARED_LIBRARY)
     51 
     52 # libwebserv-proxies-internal shared library
     53 # ========================================================
     54 # You do not want to depend on this.  Depend on libwebserv instead.
     55 # libwebserv abstracts and helps you consume this interface.
     56 #
     57 # This library builds the proxies which webservd will use to communicate back
     58 # to libwebservd over DBus.
     59 ifeq ($(system_webservd_use_dbus),true)
     60 include $(CLEAR_VARS)
     61 LOCAL_MODULE := libwebserv-proxies-internal
     62 
     63 LOCAL_SRC_FILES := \
     64     dbus_bindings/org.chromium.WebServer.RequestHandler.dbus-xml \
     65 
     66 LOCAL_DBUS_PROXY_PREFIX := libwebserv
     67 
     68 $(eval $(webservd_common))
     69 $(eval $(webservd_common_libraries))
     70 include $(BUILD_SHARED_LIBRARY)
     71 endif
     72 
     73 
     74 # libwebserv-binder-internal shared library
     75 # ========================================================
     76 # You do not want to depend on this.  Depend on libwebserv instead.
     77 # libwebserv abstracts and helps you consume this interface.
     78 #
     79 # This library builds the binder interfaces used between webservd and libwebserv
     80 ifeq ($(system_webservd_use_binder),true)
     81 include $(CLEAR_VARS)
     82 LOCAL_MODULE := libwebserv-binder-internal
     83 
     84 LOCAL_SRC_FILES += \
     85     ../aidl/android/webservd/IServer.aidl \
     86     ../aidl/android/webservd/IProtocolHandler.aidl \
     87     binder_constants.cc
     88 
     89 LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/../aidl
     90 $(eval $(webservd_common))
     91 $(eval $(webservd_common_libraries))
     92 include $(BUILD_SHARED_LIBRARY)
     93 endif
     94