1// Copyright (C) 2018 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 15package { 16 default_applicable_licenses: ["external_ppp_pppd_license"], 17} 18 19// Added automatically by a large-scale-change that took the approach of 20// 'apply every license found to every target'. While this makes sure we respect 21// every license restriction, it may not be entirely correct. 22// 23// e.g. GPL in an MIT project might only apply to the contrib/ directory. 24// 25// Please consider splitting the single license below into multiple licenses, 26// taking care not to lose any license_kind information, and overriding the 27// default license using the 'licenses: [...]' property on targets as needed. 28// 29// For unused files, consider creating a 'fileGroup' with "//visibility:private" 30// to attach the license to, and including a comment whether the files may be 31// used in the current project. 32// See: http://go/android-license-faq 33license { 34 name: "external_ppp_pppd_license", 35 visibility: [":__subpackages__"], 36 license_kinds: [ 37 "SPDX-license-identifier-0BSD", 38 "SPDX-license-identifier-Apache-2.0", 39 "SPDX-license-identifier-BSD", 40 "SPDX-license-identifier-GPL", 41 "SPDX-license-identifier-GPL-2.0", 42 "SPDX-license-identifier-LGPL", 43 "SPDX-license-identifier-MIT", 44 "legacy_notice", 45 "legacy_unencumbered", 46 ], 47 license_text: [ 48 "NOTICE", 49 ], 50} 51 52cc_defaults { 53 name: "ppp_defaults", 54 cflags: [ 55 "-DCHAPMS=1", 56 "-DMPPE=1", 57 "-DINET6=1", 58 "-DUSE_OPENSSL=1", 59 "-Wno-missing-field-initializers", 60 "-Wno-unused-parameter", 61 "-Werror", 62 "-Wno-pointer-sign", 63 "-DPLUGIN", 64 ], 65 local_include_dirs: ["include"], 66} 67 68filegroup { 69 name: "pppd-sources", 70 srcs: [ 71 "auth.c", 72 "ccp.c", 73 "chap-md5.c", 74 "chap-new.c", 75 "chap_ms.c", 76 "demand.c", 77 "eap.c", 78 "ecp.c", 79 "eui64.c", 80 "fsm.c", 81 "ipcp.c", 82 "ipv6cp.c", 83 "lcp.c", 84 "magic.c", 85 "main.c", 86 "options.c", 87 "pppcrypt.c", 88 "pppox.c", 89 "session.c", 90 "sys-linux.c", 91 "tty.c", 92 "upap.c", 93 "utils.c", 94 ], 95} 96 97cc_library_static { 98 name: "libpppd", 99 defaults: ["ppp_defaults"], 100 101 srcs: [ 102 ":pppd-sources", 103 ], 104 export_include_dirs: [ 105 ".", 106 "include", 107 ], 108 109 // options.c:623:21: error: passing 'const char *' to parameter of 110 // type 'char *' discards qualifiers. 111 // [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 112 113 shared_libs: [ 114 "libdl", 115 "liblog", 116 "libcutils", 117 "libcrypto", 118 ], 119 120 cflags: [ 121 "-Dmain=main_loop", 122 "-Wno-empty-body", 123 "-Wno-attributes", 124 "-Wno-sign-compare", 125 "-Wno-incompatible-pointer-types-discards-qualifiers", 126 ], 127 128 ldflags: ["-rdynamic"], 129 required: [ 130 "pppol2tp-android", 131 "pppopptp-android", 132 ], 133} 134 135cc_binary { 136 name: "pppd", 137 defaults: ["ppp_defaults"], 138 139 srcs: [ 140 ":pppd-sources", 141 ], 142 143 shared_libs: [ 144 "libdl", 145 "liblog", 146 "libcutils", 147 "libcrypto", 148 ], 149 150 ldflags: ["-rdynamic"], 151 152 cflags: ["-Wno-incompatible-pointer-types-discards-qualifiers"], 153 154 required: [ 155 "pppol2tp-android", 156 "pppopptp-android", 157 ], 158 159 sanitize: { 160 memtag_heap: true, 161 }, 162} 163 164cc_library_shared { 165 name: "pppol2tp-android", 166 defaults: ["ppp_defaults"], 167 srcs: ["plugins/pppol2tp-android/pppol2tp-android.c"], 168 allow_undefined_symbols: true, 169} 170 171cc_library_shared { 172 name: "pppopptp-android", 173 defaults: ["ppp_defaults"], 174 srcs: ["plugins/pppopptp-android/pppopptp-android.c"], 175 allow_undefined_symbols: true, 176} 177