blob: 9bc6e61193f8be391ec4f3965f918f89bfd8da26 [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 +000019includes := external/zlib
20
Dan Albert27d166c2014-10-16 20:47:51 -070021include $(CLEAR_VARS)
22LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Narayan Kamath7462f022013-11-21 13:05:04 +000023LOCAL_CPP_EXTENSION := .cc
24LOCAL_SRC_FILES := ${source_files}
Narayan Kamath7462f022013-11-21 13:05:04 +000025LOCAL_STATIC_LIBRARIES := libz
Narayan Kamatheaf98852013-12-11 14:51:51 +000026LOCAL_SHARED_LIBRARIES := libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000027LOCAL_MODULE:= libziparchive
Narayan Kamath7462f022013-11-21 13:05:04 +000028LOCAL_C_INCLUDES += ${includes}
Mark Salyzyn51d562d2014-05-05 14:38:05 -070029LOCAL_CFLAGS := -Werror
Narayan Kamath7462f022013-11-21 13:05:04 +000030include $(BUILD_STATIC_LIBRARY)
31
32include $(CLEAR_VARS)
Dan Albert27d166c2014-10-16 20:47:51 -070033LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Narayan Kamath7462f022013-11-21 13:05:04 +000034LOCAL_MODULE := libziparchive
35LOCAL_CPP_EXTENSION := .cc
36LOCAL_SRC_FILES := ${source_files}
37LOCAL_C_INCLUDES += ${includes}
Narayan Kamatheaf98852013-12-11 14:51:51 +000038LOCAL_STATIC_LIBRARIES := libz libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000039LOCAL_MODULE:= libziparchive-host
Mark Salyzyn51d562d2014-05-05 14:38:05 -070040LOCAL_CFLAGS := -Werror
Xavier Ducrohetcd1da4e2014-10-15 23:38:17 -070041ifneq ($(strip $(USE_MINGW)),)
42 LOCAL_CFLAGS += -mno-ms-bitfields
43endif
Ian Rogers5af80aa2014-06-17 01:50:25 -070044LOCAL_MULTILIB := both
Narayan Kamath7462f022013-11-21 13:05:04 +000045include $(BUILD_HOST_STATIC_LIBRARY)
46
47include $(CLEAR_VARS)
Dan Albert27d166c2014-10-16 20:47:51 -070048LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Ian Rogers40ac96c2014-10-30 09:53:38 -070049LOCAL_MODULE := libziparchive
50LOCAL_CPP_EXTENSION := .cc
51LOCAL_SRC_FILES := ${source_files}
52LOCAL_C_INCLUDES += ${includes}
Ian Rogers40ac96c2014-10-30 09:53:38 -070053LOCAL_STATIC_LIBRARIES := libz libutils
54LOCAL_SHARED_LIBRARIES := liblog
55LOCAL_MODULE:= libziparchive-host
56LOCAL_CFLAGS := -Werror
57LOCAL_MULTILIB := both
58include $(BUILD_HOST_SHARED_LIBRARY)
59
Dan Albert27d166c2014-10-16 20:47:51 -070060# Tests.
Ian Rogers40ac96c2014-10-30 09:53:38 -070061include $(CLEAR_VARS)
Dan Albert27d166c2014-10-16 20:47:51 -070062LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Narayan Kamath7462f022013-11-21 13:05:04 +000063LOCAL_MODULE := ziparchive-tests
64LOCAL_CPP_EXTENSION := .cc
Dan Albert27d166c2014-10-16 20:47:51 -070065LOCAL_CFLAGS := -Werror
Narayan Kamath7462f022013-11-21 13:05:04 +000066LOCAL_SRC_FILES := zip_archive_test.cc
Narayan Kamath95986aa2014-01-03 15:40:37 +000067LOCAL_SHARED_LIBRARIES := liblog
Dan Albert27d166c2014-10-16 20:47:51 -070068LOCAL_STATIC_LIBRARIES := libziparchive libz libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000069include $(BUILD_NATIVE_TEST)
Narayan Kamath58aaf462013-12-10 16:47:14 +000070
71include $(CLEAR_VARS)
Dan Albert27d166c2014-10-16 20:47:51 -070072LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Narayan Kamath58aaf462013-12-10 16:47:14 +000073LOCAL_MODULE := ziparchive-tests-host
74LOCAL_CPP_EXTENSION := .cc
75LOCAL_CFLAGS += \
Tim Murray06fce9d2014-07-17 16:36:46 -070076 -Werror \
77 -Wno-unnamed-type-template-args
Narayan Kamath58aaf462013-12-10 16:47:14 +000078LOCAL_SRC_FILES := zip_archive_test.cc
Ian Rogers40ac96c2014-10-30 09:53:38 -070079LOCAL_SHARED_LIBRARIES := libziparchive-host liblog
80LOCAL_STATIC_LIBRARIES := \
Dan Albert27d166c2014-10-16 20:47:51 -070081 libz \
82 libutils
Narayan Kamath58aaf462013-12-10 16:47:14 +000083include $(BUILD_HOST_NATIVE_TEST)