1# Copyright (C) 2014 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15LOCAL_PATH := $(call my-dir) 16 17### 18### netd service AIDL interface. 19### 20include $(CLEAR_VARS) 21 22LOCAL_CFLAGS := -Wall -Werror 23LOCAL_CLANG := true 24LOCAL_MODULE := libnetdaidl 25LOCAL_SHARED_LIBRARIES := \ 26 libbinder \ 27 libutils 28LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/binder 29LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder 30LOCAL_C_INCLUDES := $(LOCAL_PATH)/binder 31LOCAL_SRC_FILES := \ 32 binder/android/net/INetd.aidl \ 33 binder/android/net/UidRange.cpp 34 35include $(BUILD_SHARED_LIBRARY) 36 37### 38### netd daemon. 39### 40include $(CLEAR_VARS) 41 42LOCAL_C_INCLUDES := \ 43 $(call include-path-for, libhardware_legacy)/hardware_legacy \ 44 bionic/libc/dns/include \ 45 external/mdnsresponder/mDNSShared \ 46 system/netd/include \ 47 48LOCAL_CLANG := true 49LOCAL_CPPFLAGS := -std=c++11 -Wall -Werror 50LOCAL_MODULE := netd 51 52LOCAL_INIT_RC := netd.rc 53 54LOCAL_SHARED_LIBRARIES := \ 55 libbinder \ 56 libcrypto \ 57 libcutils \ 58 libdl \ 59 libhardware_legacy \ 60 liblog \ 61 liblogwrap \ 62 libmdnssd \ 63 libnetdaidl \ 64 libnetutils \ 65 libnl \ 66 libsysutils \ 67 libbase \ 68 libutils \ 69 70LOCAL_STATIC_LIBRARIES := \ 71 libpcap \ 72 73LOCAL_SRC_FILES := \ 74 BandwidthController.cpp \ 75 ClatdController.cpp \ 76 CommandListener.cpp \ 77 Controllers.cpp \ 78 DnsProxyListener.cpp \ 79 DummyNetwork.cpp \ 80 DumpWriter.cpp \ 81 FirewallController.cpp \ 82 FwmarkServer.cpp \ 83 IdletimerController.cpp \ 84 InterfaceController.cpp \ 85 LocalNetwork.cpp \ 86 MDnsSdListener.cpp \ 87 NatController.cpp \ 88 NetdCommand.cpp \ 89 NetdConstants.cpp \ 90 NetdNativeService.cpp \ 91 NetlinkHandler.cpp \ 92 NetlinkManager.cpp \ 93 Network.cpp \ 94 NetworkController.cpp \ 95 PhysicalNetwork.cpp \ 96 PppController.cpp \ 97 ResolverController.cpp \ 98 RouteController.cpp \ 99 SockDiag.cpp \ 100 SoftapController.cpp \ 101 StrictController.cpp \ 102 TetherController.cpp \ 103 UidRanges.cpp \ 104 VirtualNetwork.cpp \ 105 main.cpp \ 106 oem_iptables_hook.cpp \ 107 binder/android/net/metrics/IDnsEventListener.aidl \ 108 109LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/binder 110 111include $(BUILD_EXECUTABLE) 112 113 114### 115### ndc binary. 116### 117include $(CLEAR_VARS) 118 119LOCAL_CFLAGS := -Wall -Werror 120LOCAL_CLANG := true 121LOCAL_MODULE := ndc 122LOCAL_SHARED_LIBRARIES := libcutils 123LOCAL_SRC_FILES := ndc.c 124 125include $(BUILD_EXECUTABLE) 126 127### 128### netd unit tests. 129### 130include $(CLEAR_VARS) 131LOCAL_MODULE := netd_unit_test 132LOCAL_CFLAGS := -Wall -Werror -Wunused-parameter 133LOCAL_C_INCLUDES := system/netd/server system/netd/server/binder system/core/logwrapper/include 134LOCAL_SRC_FILES := \ 135 NetdConstants.cpp IptablesBaseTest.cpp \ 136 BandwidthController.cpp BandwidthControllerTest.cpp \ 137 FirewallControllerTest.cpp FirewallController.cpp \ 138 SockDiagTest.cpp SockDiag.cpp \ 139 StrictController.cpp StrictControllerTest.cpp \ 140 UidRanges.cpp \ 141 142LOCAL_MODULE_TAGS := tests 143LOCAL_SHARED_LIBRARIES := liblog libbase libcutils liblogwrap 144include $(BUILD_NATIVE_TEST) 145 146