Jesse Hall | 081806e | 2017-02-11 22:50:02 -0800 | [diff] [blame] | 1 | ndk_headers { |
| 2 | name: "libsync_headers", |
| 3 | from: "include/ndk", |
| 4 | to: "android", |
| 5 | srcs: ["include/ndk/sync.h"], |
| 6 | license: "NOTICE", |
| 7 | } |
| 8 | |
| 9 | ndk_library { |
Steven Moreland | db9b260 | 2017-04-10 12:58:03 -0700 | [diff] [blame] | 10 | name: "libsync", |
Jesse Hall | 081806e | 2017-02-11 22:50:02 -0800 | [diff] [blame] | 11 | symbol_file: "libsync.map.txt", |
| 12 | first_version: "26", |
| 13 | } |
| 14 | |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 15 | cc_defaults { |
| 16 | name: "libsync_defaults", |
| 17 | srcs: ["sync.c"], |
| 18 | local_include_dirs: ["include"], |
| 19 | export_include_dirs: ["include"], |
| 20 | cflags: ["-Werror"], |
| 21 | } |
| 22 | |
| 23 | cc_library_shared { |
| 24 | name: "libsync", |
Steven Moreland | d0b26ed | 2017-04-13 23:27:20 -0700 | [diff] [blame] | 25 | vendor_available: true, |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 26 | defaults: ["libsync_defaults"], |
| 27 | } |
| 28 | |
| 29 | // libsync_recovery is only intended for the recovery binary. |
| 30 | // Future versions of the kernel WILL require an updated libsync, and will break |
| 31 | // anything statically linked against the current libsync. |
| 32 | cc_library_static { |
| 33 | name: "libsync_recovery", |
| 34 | defaults: ["libsync_defaults"], |
| 35 | } |
| 36 | |
| 37 | cc_test { |
| 38 | name: "sync_test", |
| 39 | defaults: ["libsync_defaults"], |
| 40 | gtest: false, |
| 41 | srcs: ["sync_test.c"], |
| 42 | } |
| 43 | |
| 44 | cc_test { |
| 45 | name: "sync-unit-tests", |
| 46 | shared_libs: ["libsync"], |
| 47 | srcs: ["tests/sync_test.cpp"], |
| 48 | cflags: [ |
| 49 | "-g", |
| 50 | "-Wall", |
| 51 | "-Werror", |
Dan Willemsen | 194edf7 | 2016-08-26 15:01:36 -0700 | [diff] [blame] | 52 | "-Wno-missing-field-initializers", |
| 53 | "-Wno-sign-compare", |
| 54 | ], |
| 55 | clang: true, |
| 56 | } |