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 | includes := external/zlib |
| 20 | |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 21 | include $(CLEAR_VARS) |
| 22 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 23 | LOCAL_CPP_EXTENSION := .cc |
| 24 | LOCAL_SRC_FILES := ${source_files} |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 25 | LOCAL_STATIC_LIBRARIES := libz |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 26 | LOCAL_SHARED_LIBRARIES := libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 27 | LOCAL_MODULE:= libziparchive |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 28 | LOCAL_C_INCLUDES += ${includes} |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 29 | LOCAL_CFLAGS := -Werror |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 30 | include $(BUILD_STATIC_LIBRARY) |
| 31 | |
| 32 | include $(CLEAR_VARS) |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 33 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 34 | LOCAL_MODULE := libziparchive |
| 35 | LOCAL_CPP_EXTENSION := .cc |
| 36 | LOCAL_SRC_FILES := ${source_files} |
| 37 | LOCAL_C_INCLUDES += ${includes} |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 38 | LOCAL_STATIC_LIBRARIES := libz libutils |
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 |
Xavier Ducrohet | cd1da4e | 2014-10-15 23:38:17 -0700 | [diff] [blame] | 41 | ifneq ($(strip $(USE_MINGW)),) |
| 42 | LOCAL_CFLAGS += -mno-ms-bitfields |
| 43 | endif |
Ian Rogers | 5af80aa | 2014-06-17 01:50:25 -0700 | [diff] [blame] | 44 | LOCAL_MULTILIB := both |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 45 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 46 | |
| 47 | include $(CLEAR_VARS) |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 48 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 49 | LOCAL_MODULE := libziparchive |
| 50 | LOCAL_CPP_EXTENSION := .cc |
| 51 | LOCAL_SRC_FILES := ${source_files} |
| 52 | LOCAL_C_INCLUDES += ${includes} |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 53 | LOCAL_STATIC_LIBRARIES := libz libutils |
| 54 | LOCAL_SHARED_LIBRARIES := liblog |
| 55 | LOCAL_MODULE:= libziparchive-host |
| 56 | LOCAL_CFLAGS := -Werror |
| 57 | LOCAL_MULTILIB := both |
| 58 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 59 | |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 60 | # Tests. |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 61 | include $(CLEAR_VARS) |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 62 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 63 | LOCAL_MODULE := ziparchive-tests |
| 64 | LOCAL_CPP_EXTENSION := .cc |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 65 | LOCAL_CFLAGS := -Werror |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 66 | LOCAL_SRC_FILES := zip_archive_test.cc |
Narayan Kamath | 95986aa | 2014-01-03 15:40:37 +0000 | [diff] [blame] | 67 | LOCAL_SHARED_LIBRARIES := liblog |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 68 | LOCAL_STATIC_LIBRARIES := libziparchive libz libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 69 | include $(BUILD_NATIVE_TEST) |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 70 | |
| 71 | include $(CLEAR_VARS) |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 72 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 73 | LOCAL_MODULE := ziparchive-tests-host |
| 74 | LOCAL_CPP_EXTENSION := .cc |
| 75 | LOCAL_CFLAGS += \ |
Tim Murray | 06fce9d | 2014-07-17 16:36:46 -0700 | [diff] [blame] | 76 | -Werror \ |
| 77 | -Wno-unnamed-type-template-args |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 78 | LOCAL_SRC_FILES := zip_archive_test.cc |
Ian Rogers | 40ac96c | 2014-10-30 09:53:38 -0700 | [diff] [blame] | 79 | LOCAL_SHARED_LIBRARIES := libziparchive-host liblog |
| 80 | LOCAL_STATIC_LIBRARIES := \ |
Dan Albert | 27d166c | 2014-10-16 20:47:51 -0700 | [diff] [blame] | 81 | libz \ |
| 82 | libutils |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 83 | include $(BUILD_HOST_NATIVE_TEST) |