blob: 559c48bb3f066c9c1be1498a214ce5ac4979504f [file] [log] [blame]
Narayan Kamath7462f022013-11-21 13:05:04 +00001#
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
16LOCAL_PATH := $(call my-dir)
Narayan Kamath7462f022013-11-21 13:05:04 +000017
Dan Albert27d166c2014-10-16 20:47:51 -070018source_files := zip_archive.cc
Narayan Kamath7462f022013-11-21 13:05:04 +000019
Dan Albert27d166c2014-10-16 20:47:51 -070020include $(CLEAR_VARS)
Narayan Kamath7462f022013-11-21 13:05:04 +000021LOCAL_CPP_EXTENSION := .cc
22LOCAL_SRC_FILES := ${source_files}
Narayan Kamath7462f022013-11-21 13:05:04 +000023LOCAL_STATIC_LIBRARIES := libz
Dan Albert1ae07642015-04-09 14:11:18 -070024LOCAL_SHARED_LIBRARIES := libutils libbase
Narayan Kamath7462f022013-11-21 13:05:04 +000025LOCAL_MODULE:= libziparchive
Dmitriy Ivanovf4cb8e22015-03-06 10:50:56 -080026LOCAL_CFLAGS := -Werror -Wall
Dmitriy Ivanovf94e1592015-03-06 13:27:59 -080027LOCAL_CPPFLAGS := -Wold-style-cast
Narayan Kamath7462f022013-11-21 13:05:04 +000028include $(BUILD_STATIC_LIBRARY)
29
30include $(CLEAR_VARS)
Narayan Kamath7462f022013-11-21 13:05:04 +000031LOCAL_CPP_EXTENSION := .cc
32LOCAL_SRC_FILES := ${source_files}
Dan Albert1ae07642015-04-09 14:11:18 -070033LOCAL_STATIC_LIBRARIES := libz libutils libbase
Narayan Kamath7462f022013-11-21 13:05:04 +000034LOCAL_MODULE:= libziparchive-host
Mark Salyzyn51d562d2014-05-05 14:38:05 -070035LOCAL_CFLAGS := -Werror
Xavier Ducrohetcd1da4e2014-10-15 23:38:17 -070036ifneq ($(strip $(USE_MINGW)),)
37 LOCAL_CFLAGS += -mno-ms-bitfields
38endif
Ian Rogers5af80aa2014-06-17 01:50:25 -070039LOCAL_MULTILIB := both
Narayan Kamath7462f022013-11-21 13:05:04 +000040include $(BUILD_HOST_STATIC_LIBRARY)
41
42include $(CLEAR_VARS)
Ian Rogers40ac96c2014-10-30 09:53:38 -070043LOCAL_CPP_EXTENSION := .cc
44LOCAL_SRC_FILES := ${source_files}
Evgenii Stepanov953314f2015-06-29 16:27:44 -070045LOCAL_STATIC_LIBRARIES := libutils
46LOCAL_SHARED_LIBRARIES := libz-host liblog libbase
Ian Rogers40ac96c2014-10-30 09:53:38 -070047LOCAL_MODULE:= libziparchive-host
48LOCAL_CFLAGS := -Werror
49LOCAL_MULTILIB := both
50include $(BUILD_HOST_SHARED_LIBRARY)
51
Dan Albert27d166c2014-10-16 20:47:51 -070052# Tests.
Ian Rogers40ac96c2014-10-30 09:53:38 -070053include $(CLEAR_VARS)
Narayan Kamath7462f022013-11-21 13:05:04 +000054LOCAL_MODULE := ziparchive-tests
55LOCAL_CPP_EXTENSION := .cc
Dan Albert27d166c2014-10-16 20:47:51 -070056LOCAL_CFLAGS := -Werror
Narayan Kamath044bc8e2014-12-03 18:22:53 +000057LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc
Dan Albert1ae07642015-04-09 14:11:18 -070058LOCAL_SHARED_LIBRARIES := liblog libbase
Dan Albert27d166c2014-10-16 20:47:51 -070059LOCAL_STATIC_LIBRARIES := libziparchive libz libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000060include $(BUILD_NATIVE_TEST)
Narayan Kamath58aaf462013-12-10 16:47:14 +000061
62include $(CLEAR_VARS)
63LOCAL_MODULE := ziparchive-tests-host
64LOCAL_CPP_EXTENSION := .cc
65LOCAL_CFLAGS += \
Tim Murray06fce9d2014-07-17 16:36:46 -070066 -Werror \
67 -Wno-unnamed-type-template-args
Narayan Kamath044bc8e2014-12-03 18:22:53 +000068LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc
Dan Albert1ae07642015-04-09 14:11:18 -070069LOCAL_SHARED_LIBRARIES := libziparchive-host liblog libbase
Ian Rogers40ac96c2014-10-30 09:53:38 -070070LOCAL_STATIC_LIBRARIES := \
Dan Albert27d166c2014-10-16 20:47:51 -070071 libz \
72 libutils
Narayan Kamath58aaf462013-12-10 16:47:14 +000073include $(BUILD_HOST_NATIVE_TEST)