Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2013 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 | LOCAL_PATH := $(call my-dir) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 17 | |
Adam Lesinski | ad4ad8c | 2015-10-05 18:16:18 -0700 | [diff] [blame^] | 18 | source_files := zip_archive.cc zip_writer.cc |
| 19 | test_files := zip_archive_test.cc zip_writer_test.cc entry_name_utils_test.cc |
| 20 | |
| 21 | # Incorrectly warns when C++11 empty brace {} initializer is used. |
| 22 | # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61489 |
| 23 | common_cpp_flags := -Wno-missing-field-initializers |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 24 | |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 25 | include $(CLEAR_VARS) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 26 | LOCAL_CPP_EXTENSION := .cc |
| 27 | LOCAL_SRC_FILES := ${source_files} |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 28 | LOCAL_STATIC_LIBRARIES := libz |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 29 | LOCAL_SHARED_LIBRARIES := libutils libbase |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 30 | LOCAL_MODULE:= libziparchive |
Dmitriy Ivanov | f4cb8e2 | 2015-03-06 10:50:56 -0800 | [diff] [blame] | 31 | LOCAL_CFLAGS := -Werror -Wall |
Adam Lesinski | ad4ad8c | 2015-10-05 18:16:18 -0700 | [diff] [blame^] | 32 | LOCAL_CPPFLAGS := -Wold-style-cast $(common_cpp_flags) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 33 | include $(BUILD_STATIC_LIBRARY) |
| 34 | |
| 35 | include $(CLEAR_VARS) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 36 | LOCAL_CPP_EXTENSION := .cc |
| 37 | LOCAL_SRC_FILES := ${source_files} |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 38 | LOCAL_STATIC_LIBRARIES := libz libutils libbase |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 39 | LOCAL_MODULE:= libziparchive-host |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 40 | LOCAL_CFLAGS := -Werror |
Dan Willemsen | 87a419c | 2015-08-13 14:43:34 -0700 | [diff] [blame] | 41 | LOCAL_CFLAGS_windows := -mno-ms-bitfields |
Adam Lesinski | ad4ad8c | 2015-10-05 18:16:18 -0700 | [diff] [blame^] | 42 | LOCAL_CPPFLAGS := $(common_cpp_flags) |
| 43 | |
Ian Rogers | 5af80aa | 2014-06-17 01:50:25 -0700 | [diff] [blame] | 44 | LOCAL_MULTILIB := both |
Dan Willemsen | 87a419c | 2015-08-13 14:43:34 -0700 | [diff] [blame] | 45 | LOCAL_MODULE_HOST_OS := darwin linux windows |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 46 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 47 | |
| 48 | include $(CLEAR_VARS) |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 49 | LOCAL_CPP_EXTENSION := .cc |
| 50 | LOCAL_SRC_FILES := ${source_files} |
Evgenii Stepanov | 953314f | 2015-06-29 16:27:44 -0700 | [diff] [blame] | 51 | LOCAL_STATIC_LIBRARIES := libutils |
| 52 | LOCAL_SHARED_LIBRARIES := libz-host liblog libbase |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 53 | LOCAL_MODULE:= libziparchive-host |
| 54 | LOCAL_CFLAGS := -Werror |
Adam Lesinski | ad4ad8c | 2015-10-05 18:16:18 -0700 | [diff] [blame^] | 55 | LOCAL_CPPFLAGS := $(common_cpp_flags) |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 56 | LOCAL_MULTILIB := both |
| 57 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 58 | |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 59 | # Tests. |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 60 | include $(CLEAR_VARS) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 61 | LOCAL_MODULE := ziparchive-tests |
| 62 | LOCAL_CPP_EXTENSION := .cc |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 63 | LOCAL_CFLAGS := -Werror |
Adam Lesinski | ad4ad8c | 2015-10-05 18:16:18 -0700 | [diff] [blame^] | 64 | LOCAL_CPPFLAGS := $(common_cpp_flags) |
| 65 | LOCAL_SRC_FILES := $(test_files) |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 66 | LOCAL_SHARED_LIBRARIES := liblog libbase |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 67 | LOCAL_STATIC_LIBRARIES := libziparchive libz libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 68 | include $(BUILD_NATIVE_TEST) |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 69 | |
| 70 | include $(CLEAR_VARS) |
| 71 | LOCAL_MODULE := ziparchive-tests-host |
| 72 | LOCAL_CPP_EXTENSION := .cc |
Adam Lesinski | ad4ad8c | 2015-10-05 18:16:18 -0700 | [diff] [blame^] | 73 | LOCAL_CFLAGS := -Werror |
| 74 | LOCAL_CPPFLAGS := -Wno-unnamed-type-template-args $(common_cpp_flags) |
| 75 | LOCAL_SRC_FILES := $(test_files) |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 76 | LOCAL_SHARED_LIBRARIES := libziparchive-host liblog libbase |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 77 | LOCAL_STATIC_LIBRARIES := \ |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 78 | libz \ |
| 79 | libutils |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 80 | include $(BUILD_HOST_NATIVE_TEST) |