diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-11 07:33:16 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2017-06-11 07:33:16 +0000 |
commit | 689fd022dee98c54c07bb0cd2e8dc1c7a5f37a9c (patch) | |
tree | 0fdaafd803548b7b0c62f4501ed8649c258d75b5 | |
parent | 59ace6b9435e6a8a5bd5dbba15f4c3182ff4e05e (diff) | |
parent | b44ef02436201d56d91446d45ed5b897a69ec002 (diff) | |
download | bsdiff-689fd022dee98c54c07bb0cd2e8dc1c7a5f37a9c.tar.gz |
release-request-46bf7ca6-57e7-44b8-8edc-ea8830c1cb3b-for-git_oc-mr1-release-4090244 snap-temp-L07700000073092334
Change-Id: Id7c957d697bb393503d20f27dd12970c5f902016
-rw-r--r-- | bsdiff.gyp | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/bsdiff.gyp b/bsdiff.gyp new file mode 100644 index 0000000..c71bf8d --- /dev/null +++ b/bsdiff.gyp @@ -0,0 +1,114 @@ +# Copyright (C) 2017 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +{ + 'target_defaults': { + 'cflags': [ + '-Wextra', + '-Wno-unused-parameter', + ], + 'cflags_cc': [ + '-Wnon-virtual-dtor', + ], + 'include_dirs': ['include'], + }, + 'targets': [ + # bsdiff library + { + 'target_name': 'libbsdiff', + 'type': 'static_library', + 'standalone_static_library': 1, + 'link_settings': { + 'libraries': [ + '-lbz2', + '-ldivsufsort', + '-ldivsufsort64', + ], + }, + 'sources': [ + 'bsdiff.cc', + ], + }, + # bsdiff executable + { + 'target_name': 'bsdiff', + 'type': 'executable', + 'dependencies': [ + 'libbsdiff', + ], + 'sources': [ + 'bsdiff_main.cc', + ], + }, + # bspatch library + { + 'target_name': 'libbspatch', + 'standalone_static_library': 1, + 'type': 'static_library', + 'link_settings': { + 'libraries': [ + '-lbz2', + ], + }, + 'sources': [ + 'bspatch.cc', + 'buffer_file.cc', + 'extents.cc', + 'extents_file.cc', + 'file.cc', + 'memory_file.cc', + 'sink_file.cc', + ], + }, + # bspatch executable + { + 'target_name': 'bspatch', + 'type': 'executable', + 'dependencies': [ + 'libbspatch', + ], + 'sources': [ + 'bspatch_main.cc', + ], + }, + ], + 'conditions': [ + ['USE_test == 1', { + 'targets': [ + { + 'target_name': 'bsdiff_unittest', + 'type': 'executable', + 'dependencies': [ + 'libbsdiff', + 'libbspatch', + '../common-mk/testrunner.gyp:testrunner', + ], + 'variables': { + 'deps': [ + 'libchrome-<(libbase_ver)', + ], + }, + 'includes': ['../common-mk/common_test.gypi'], + 'sources': [ + 'bsdiff_unittest.cc', + 'bspatch_unittest.cc', + 'extents_file_unittest.cc', + 'extents_unittest.cc', + 'test_utils.cc', + ], + }, + ], + }], + ], +} |