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 16LOCAL_PATH := $(call my-dir) 17include $(CLEAR_VARS) 18 19source_files := \ 20 zip_archive.h \ 21 zip_archive.cc 22 23includes := external/zlib 24 25LOCAL_CPP_EXTENSION := .cc 26LOCAL_SRC_FILES := ${source_files} 27 28LOCAL_STATIC_LIBRARIES := libz 29LOCAL_SHARED_LIBRARIES := libutils 30LOCAL_MODULE:= libziparchive 31 32LOCAL_C_INCLUDES += ${includes} 33LOCAL_CFLAGS := -Werror 34include $(BUILD_STATIC_LIBRARY) 35 36include $(CLEAR_VARS) 37LOCAL_MODULE := libziparchive 38LOCAL_CPP_EXTENSION := .cc 39LOCAL_SRC_FILES := ${source_files} 40LOCAL_C_INCLUDES += ${includes} 41 42LOCAL_STATIC_LIBRARIES := libz libutils 43LOCAL_MODULE:= libziparchive-host 44LOCAL_CFLAGS := -Werror 45ifneq ($(strip $(USE_MINGW)),) 46 LOCAL_CFLAGS += -mno-ms-bitfields 47endif 48LOCAL_MULTILIB := both 49include $(BUILD_HOST_STATIC_LIBRARY) 50 51include $(CLEAR_VARS) 52LOCAL_MODULE := ziparchive-tests 53LOCAL_CPP_EXTENSION := .cc 54LOCAL_CFLAGS += \ 55 -DGTEST_OS_LINUX_ANDROID \ 56 -DGTEST_HAS_STD_STRING \ 57 -Werror 58LOCAL_SRC_FILES := zip_archive_test.cc 59LOCAL_SHARED_LIBRARIES := liblog 60LOCAL_STATIC_LIBRARIES := libziparchive libz libgtest libgtest_main libutils 61include $(BUILD_NATIVE_TEST) 62 63include $(CLEAR_VARS) 64LOCAL_MODULE := ziparchive-tests-host 65LOCAL_CPP_EXTENSION := .cc 66LOCAL_CFLAGS += \ 67 -DGTEST_OS_LINUX \ 68 -DGTEST_HAS_STD_STRING \ 69 -Werror 70LOCAL_SRC_FILES := zip_archive_test.cc 71LOCAL_STATIC_LIBRARIES := libziparchive-host \ 72 libz \ 73 libgtest_host \ 74 libgtest_main_host \ 75 liblog \ 76 libutils 77include $(BUILD_HOST_NATIVE_TEST) 78