Will Drewry | d4ae528 | 2017-01-03 22:06:26 -0600 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 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 | |
Will Drewry | b6635bf | 2017-03-30 08:02:36 -0500 | [diff] [blame] | 17 | cc_defaults { |
| 18 | name: "libese-defaults", |
| 19 | |
Will Drewry | 28e79ff | 2017-04-07 00:15:31 -0500 | [diff] [blame] | 20 | proprietary: true, |
Chih-Hung Hsieh | c5b766a | 2017-09-28 14:01:29 -0700 | [diff] [blame] | 21 | cflags: [ |
| 22 | "-std=c99", |
| 23 | "-D_FORTIFY_SOURCE=2", |
| 24 | "-Wall", |
| 25 | "-Werror", |
| 26 | ], |
Will Drewry | b6635bf | 2017-03-30 08:02:36 -0500 | [diff] [blame] | 27 | |
| 28 | // This doesn't work yet, but is good documentation for when |
| 29 | // debugging is needed. |
| 30 | debug: { |
| 31 | cflags: ["-DLOG_NDEBUG=0"], |
| 32 | }, |
| 33 | } |
| 34 | |
| 35 | cc_defaults { |
| 36 | name: "libese-api-defaults", |
| 37 | defaults: ["libese-defaults"], |
| 38 | |
| 39 | // Ensure that only explicitly exported symbols are visible. |
| 40 | local_include_dirs: ["include"], |
| 41 | export_include_dirs: ["include"], |
| 42 | cflags: ["-fvisibility=internal"], |
| 43 | } |
| 44 | |
Will Drewry | d4ae528 | 2017-01-03 22:06:26 -0600 | [diff] [blame] | 45 | cc_library { |
| 46 | name: "libese", |
Will Drewry | b6635bf | 2017-03-30 08:02:36 -0500 | [diff] [blame] | 47 | defaults: ["libese-api-defaults"], |
Will Drewry | d4ae528 | 2017-01-03 22:06:26 -0600 | [diff] [blame] | 48 | host_supported: true, |
| 49 | |
| 50 | srcs: [ |
| 51 | "ese.c", |
Will Drewry | 8f367fc | 2017-03-30 22:07:48 -0500 | [diff] [blame] | 52 | "ese_sg.c", |
Will Drewry | d4ae528 | 2017-01-03 22:06:26 -0600 | [diff] [blame] | 53 | ], |
| 54 | |
Steven Moreland | e02e433 | 2017-07-17 13:25:56 -0700 | [diff] [blame] | 55 | export_include_dirs: ["include"], |
| 56 | |
Will Drewry | de2cad7 | 2017-03-10 15:53:34 -0600 | [diff] [blame] | 57 | shared_libs: ["libese-sysdeps", "liblog"], |
Steven Moreland | e02e433 | 2017-07-17 13:25:56 -0700 | [diff] [blame] | 58 | export_shared_lib_headers: ["liblog"], |
Will Drewry | d4ae528 | 2017-01-03 22:06:26 -0600 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | subdirs = ["tests"] |