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// 15// 16 17cc_defaults { 18 name: "libprotobuf-c-nano-defaults", 19 cflags: [ 20 "-Wall", 21 "-Werror", 22 "-Wno-sign-compare", 23 "-Wno-unused-parameter", 24 ], 25 srcs: [ 26 "pb_common.c", 27 "pb_decode.c", 28 "pb_encode.c", 29 ], 30 sdk_version: "19", 31 export_include_dirs: ["."], 32 vendor_available: true, 33} 34 35cc_library_static { 36 name: "libprotobuf-c-nano", 37 defaults: ["libprotobuf-c-nano-defaults"], 38} 39 40cc_library_static { 41 name: "libprotobuf-c-nano-enable_malloc", 42 defaults: ["libprotobuf-c-nano-defaults"], 43 44 cflags: ["-DPB_ENABLE_MALLOC"], 45} 46 47cc_library_static { 48 name: "libprotobuf-c-nano-16bit", 49 defaults: ["libprotobuf-c-nano-defaults"], 50 51 cflags: ["-DPB_FIELD_16BIT"], 52} 53 54cc_library_static { 55 name: "libprotobuf-c-nano-enable_malloc-16bit", 56 defaults: ["libprotobuf-c-nano-defaults"], 57 58 cflags: ["-DPB_ENABLE_MALLOC", "-DPB_FIELD_16BIT"], 59} 60 61cc_library_static { 62 name: "libprotobuf-c-nano-32bit", 63 defaults: ["libprotobuf-c-nano-defaults"], 64 65 cflags: ["-DPB_FIELD_32BIT"], 66} 67 68cc_library_static { 69 name: "libprotobuf-c-nano-enable_malloc-32bit", 70 defaults: ["libprotobuf-c-nano-defaults"], 71 72 cflags: ["-DPB_ENABLE_MALLOC", "-DPB_FIELD_32BIT"], 73} 74