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) 17 18 source_files := zip_archive.cc 19 20 include $(CLEAR_VARS) 21 LOCAL_CPP_EXTENSION := .cc 22 LOCAL_SRC_FILES := ${source_files} 23 LOCAL_STATIC_LIBRARIES := libz 24 LOCAL_SHARED_LIBRARIES := libutils libbase 25 LOCAL_MODULE:= libziparchive 26 LOCAL_CFLAGS := -Werror -Wall 27 LOCAL_CPPFLAGS := -Wold-style-cast 28 include $(BUILD_STATIC_LIBRARY) 29 30 include $(CLEAR_VARS) 31 LOCAL_CPP_EXTENSION := .cc 32 LOCAL_SRC_FILES := ${source_files} 33 LOCAL_STATIC_LIBRARIES := libz libutils libbase 34 LOCAL_MODULE:= libziparchive-host 35 LOCAL_CFLAGS := -Werror 36 ifneq ($(strip $(USE_MINGW)),) 37 LOCAL_CFLAGS += -mno-ms-bitfields 38 endif 39 LOCAL_MULTILIB := both 40 include $(BUILD_HOST_STATIC_LIBRARY) 41 42 include $(CLEAR_VARS) 43 LOCAL_CPP_EXTENSION := .cc 44 LOCAL_SRC_FILES := ${source_files} 45 LOCAL_STATIC_LIBRARIES := libz libutils 46 LOCAL_SHARED_LIBRARIES := liblog libbase 47 LOCAL_MODULE:= libziparchive-host 48 LOCAL_CFLAGS := -Werror 49 LOCAL_MULTILIB := both 50 include $(BUILD_HOST_SHARED_LIBRARY) 51 52 # Tests. 53 include $(CLEAR_VARS) 54 LOCAL_MODULE := ziparchive-tests 55 LOCAL_CPP_EXTENSION := .cc 56 LOCAL_CFLAGS := -Werror 57 LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc 58 LOCAL_SHARED_LIBRARIES := liblog libbase 59 LOCAL_STATIC_LIBRARIES := libziparchive libz libutils 60 include $(BUILD_NATIVE_TEST) 61 62 include $(CLEAR_VARS) 63 LOCAL_MODULE := ziparchive-tests-host 64 LOCAL_CPP_EXTENSION := .cc 65 LOCAL_CFLAGS += \ 66 -Werror \ 67 -Wno-unnamed-type-template-args 68 LOCAL_SRC_FILES := zip_archive_test.cc entry_name_utils_test.cc 69 LOCAL_SHARED_LIBRARIES := libziparchive-host liblog libbase 70 LOCAL_STATIC_LIBRARIES := \ 71 libz \ 72 libutils 73 include $(BUILD_HOST_NATIVE_TEST) 74