blob: 608ff1cc0c40a5d64e3877836e725580d2d67e40 [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
Dan Willemsen87a419c2015-08-13 14:43:34 -070036LOCAL_CFLAGS_windows := -mno-ms-bitfields
Ian Rogers5af80aa2014-06-17 01:50:25 -070037LOCAL_MULTILIB := both
Dan Willemsen87a419c2015-08-13 14:43:34 -070038LOCAL_MODULE_HOST_OS := darwin linux windows
Narayan Kamath7462f022013-11-21 13:05:04 +000039include $(BUILD_HOST_STATIC_LIBRARY)
40
41include $(CLEAR_VARS)
Ian Rogers40ac96c2014-10-30 09:53:38 -070042LOCAL_CPP_EXTENSION := .cc
43LOCAL_SRC_FILES := ${source_files}
Evgenii Stepanov953314f2015-06-29 16:27:44 -070044LOCAL_STATIC_LIBRARIES := libutils
45LOCAL_SHARED_LIBRARIES := libz-host liblog libbase
Ian Rogers40ac96c2014-10-30 09:53:38 -070046LOCAL_MODULE:= libziparchive-host
47LOCAL_CFLAGS := -Werror
48LOCAL_MULTILIB := both
49include $(BUILD_HOST_SHARED_LIBRARY)
50
Dan Albert27d166c2014-10-16 20:47:51 -070051# Tests.
Ian Rogers40ac96c2014-10-30 09:53:38 -070052include $(CLEAR_VARS)
Narayan Kamath7462f022013-11-21 13:05:04 +000053LOCAL_MODULE := ziparchive-tests
54LOCAL_CPP_EXTENSION := .cc
Dan Albert27d166c2014-10-16 20:47:51 -070055LOCAL_CFLAGS := -Werror
Narayan Kamath044bc8e2014-12-03 18:22:53 +000056LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc
Dan Albert1ae07642015-04-09 14:11:18 -070057LOCAL_SHARED_LIBRARIES := liblog libbase
Dan Albert27d166c2014-10-16 20:47:51 -070058LOCAL_STATIC_LIBRARIES := libziparchive libz libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000059include $(BUILD_NATIVE_TEST)
Narayan Kamath58aaf462013-12-10 16:47:14 +000060
61include $(CLEAR_VARS)
62LOCAL_MODULE := ziparchive-tests-host
63LOCAL_CPP_EXTENSION := .cc
64LOCAL_CFLAGS += \
Tim Murray06fce9d2014-07-17 16:36:46 -070065 -Werror \
66 -Wno-unnamed-type-template-args
Narayan Kamath044bc8e2014-12-03 18:22:53 +000067LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc
Dan Albert1ae07642015-04-09 14:11:18 -070068LOCAL_SHARED_LIBRARIES := libziparchive-host liblog libbase
Ian Rogers40ac96c2014-10-30 09:53:38 -070069LOCAL_STATIC_LIBRARIES := \
Dan Albert27d166c2014-10-16 20:47:51 -070070 libz \
71 libutils
Narayan Kamath58aaf462013-12-10 16:47:14 +000072include $(BUILD_HOST_NATIVE_TEST)