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 15cc_defaults { 16 name: "ppp_defaults", 17 cflags: [ 18 "-DCHAPMS=1", 19 "-DMPPE=1", 20 "-DINET6=1", 21 "-DUSE_OPENSSL=1", 22 "-Wno-missing-field-initializers", 23 "-Wno-unused-parameter", 24 "-Werror", 25 "-Wno-pointer-sign", 26 ], 27 local_include_dirs: ["include"], 28} 29 30cc_binary { 31 name: "pppd", 32 defaults: ["ppp_defaults"], 33 34 srcs: [ 35 "auth.c", 36 "ccp.c", 37 "chap-md5.c", 38 "chap-new.c", 39 "chap_ms.c", 40 "demand.c", 41 "eap.c", 42 "ecp.c", 43 "eui64.c", 44 "fsm.c", 45 "ipcp.c", 46 "ipv6cp.c", 47 "lcp.c", 48 "magic.c", 49 "main.c", 50 "options.c", 51 "pppcrypt.c", 52 "pppox.c", 53 "session.c", 54 "sys-linux.c", 55 "tty.c", 56 "upap.c", 57 "utils.c", 58 ], 59 60 // options.c:623:21: error: passing 'const char *' to parameter of 61 // type 'char *' discards qualifiers. 62 // [-Werror,-Wincompatible-pointer-types-discards-qualifiers] 63 clang_cflags: ["-Wno-incompatible-pointer-types-discards-qualifiers"], 64 65 shared_libs: [ 66 "libdl", 67 "liblog", 68 "libcutils", 69 "libcrypto", 70 ], 71 72 cflags: [ 73 "-Wno-empty-body", 74 "-Wno-attributes", 75 "-Wno-sign-compare", 76 "-DPLUGIN", 77 ], 78 79 ldflags: ["-rdynamic"], 80 required: [ 81 "pppol2tp-android", 82 "pppopptp-android", 83 ], 84} 85 86cc_library_shared { 87 name: "pppol2tp-android", 88 defaults: ["ppp_defaults"], 89 srcs: ["plugins/pppol2tp-android/pppol2tp-android.c"], 90 allow_undefined_symbols: true, 91} 92 93cc_library_shared { 94 name: "pppopptp-android", 95 defaults: ["ppp_defaults"], 96 srcs: ["plugins/pppopptp-android/pppopptp-android.c"], 97 allow_undefined_symbols: true, 98} 99