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 | |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 18 | source_files := zip_archive.cc |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 19 | |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 20 | include $(CLEAR_VARS) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 21 | LOCAL_CPP_EXTENSION := .cc |
| 22 | LOCAL_SRC_FILES := ${source_files} |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 23 | LOCAL_STATIC_LIBRARIES := libz |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 24 | LOCAL_SHARED_LIBRARIES := libutils libbase |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 25 | LOCAL_MODULE:= libziparchive |
Dmitriy Ivanov | f4cb8e2 | 2015-03-06 10:50:56 -0800 | [diff] [blame] | 26 | LOCAL_CFLAGS := -Werror -Wall |
Dmitriy Ivanov | f94e159 | 2015-03-06 13:27:59 -0800 | [diff] [blame] | 27 | LOCAL_CPPFLAGS := -Wold-style-cast |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 28 | include $(BUILD_STATIC_LIBRARY) |
| 29 | |
| 30 | include $(CLEAR_VARS) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 31 | LOCAL_CPP_EXTENSION := .cc |
| 32 | LOCAL_SRC_FILES := ${source_files} |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 33 | LOCAL_STATIC_LIBRARIES := libz libutils libbase |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 34 | LOCAL_MODULE:= libziparchive-host |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 35 | LOCAL_CFLAGS := -Werror |
Xavier Ducrohet | cd1da4e | 2014-10-15 23:38:17 -0700 | [diff] [blame] | 36 | ifneq ($(strip $(USE_MINGW)),) |
| 37 | LOCAL_CFLAGS += -mno-ms-bitfields |
| 38 | endif |
Ian Rogers | 5af80aa | 2014-06-17 01:50:25 -0700 | [diff] [blame] | 39 | LOCAL_MULTILIB := both |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 40 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 41 | |
| 42 | include $(CLEAR_VARS) |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 43 | LOCAL_CPP_EXTENSION := .cc |
| 44 | LOCAL_SRC_FILES := ${source_files} |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 45 | LOCAL_STATIC_LIBRARIES := libz libutils |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 46 | LOCAL_SHARED_LIBRARIES := liblog libbase |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 47 | LOCAL_MODULE:= libziparchive-host |
| 48 | LOCAL_CFLAGS := -Werror |
| 49 | LOCAL_MULTILIB := both |
| 50 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 51 | |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 52 | # Tests. |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 53 | include $(CLEAR_VARS) |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 54 | LOCAL_MODULE := ziparchive-tests |
| 55 | LOCAL_CPP_EXTENSION := .cc |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 56 | LOCAL_CFLAGS := -Werror |
Narayan Kamath | 044bc8e | 2014-12-03 18:22:53 +0000 | [diff] [blame] | 57 | LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 58 | LOCAL_SHARED_LIBRARIES := liblog libbase |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 59 | LOCAL_STATIC_LIBRARIES := libziparchive libz libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 60 | include $(BUILD_NATIVE_TEST) |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 61 | |
| 62 | include $(CLEAR_VARS) |
| 63 | LOCAL_MODULE := ziparchive-tests-host |
| 64 | LOCAL_CPP_EXTENSION := .cc |
| 65 | LOCAL_CFLAGS += \ |
Tim Murray | 06fce9d | 2014-07-17 16:36:46 -0700 | [diff] [blame] | 66 | -Werror \ |
| 67 | -Wno-unnamed-type-template-args |
Narayan Kamath | 044bc8e | 2014-12-03 18:22:53 +0000 | [diff] [blame] | 68 | LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc |
Dan Albert | 1ae0764 | 2015-04-09 14:11:18 -0700 | [diff] [blame] | 69 | LOCAL_SHARED_LIBRARIES := libziparchive-host liblog libbase |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 70 | LOCAL_STATIC_LIBRARIES := \ |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 71 | libz \ |
| 72 | libutils |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 73 | include $(BUILD_HOST_NATIVE_TEST) |