Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 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 | include $(CLEAR_VARS) |
| 18 | |
| 19 | source_files := \ |
| 20 | zip_archive.h \ |
| 21 | zip_archive.cc |
| 22 | |
| 23 | includes := external/zlib |
| 24 | |
| 25 | LOCAL_CPP_EXTENSION := .cc |
| 26 | LOCAL_SRC_FILES := ${source_files} |
| 27 | |
| 28 | LOCAL_STATIC_LIBRARIES := libz |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 29 | LOCAL_SHARED_LIBRARIES := libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 30 | LOCAL_MODULE:= libziparchive |
| 31 | |
| 32 | LOCAL_C_INCLUDES += ${includes} |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 33 | LOCAL_CFLAGS := -Werror |
Piotr Jastrzebski | ecccc5a | 2014-08-11 16:35:11 +0100 | [diff] [blame^] | 34 | include external/libcxx/libcxx.mk |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 35 | include $(BUILD_STATIC_LIBRARY) |
| 36 | |
| 37 | include $(CLEAR_VARS) |
| 38 | LOCAL_MODULE := libziparchive |
| 39 | LOCAL_CPP_EXTENSION := .cc |
| 40 | LOCAL_SRC_FILES := ${source_files} |
| 41 | LOCAL_C_INCLUDES += ${includes} |
| 42 | |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 43 | LOCAL_STATIC_LIBRARIES := libz libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 44 | LOCAL_MODULE:= libziparchive-host |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 45 | LOCAL_CFLAGS := -Werror |
Ian Rogers | 5af80aa | 2014-06-17 01:50:25 -0700 | [diff] [blame] | 46 | LOCAL_MULTILIB := both |
Piotr Jastrzebski | ecccc5a | 2014-08-11 16:35:11 +0100 | [diff] [blame^] | 47 | include external/libcxx/libcxx.mk |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 48 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 49 | |
| 50 | include $(CLEAR_VARS) |
| 51 | LOCAL_MODULE := ziparchive-tests |
| 52 | LOCAL_CPP_EXTENSION := .cc |
| 53 | LOCAL_CFLAGS += \ |
| 54 | -DGTEST_OS_LINUX_ANDROID \ |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 55 | -DGTEST_HAS_STD_STRING \ |
| 56 | -Werror |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 57 | LOCAL_SRC_FILES := zip_archive_test.cc |
Narayan Kamath | 95986aa | 2014-01-03 15:40:37 +0000 | [diff] [blame] | 58 | LOCAL_SHARED_LIBRARIES := liblog |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 59 | LOCAL_STATIC_LIBRARIES := libziparchive libz libgtest libgtest_main libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 60 | include $(BUILD_NATIVE_TEST) |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 61 | |
| 62 | include $(CLEAR_VARS) |
| 63 | LOCAL_MODULE := ziparchive-tests-host |
| 64 | LOCAL_CPP_EXTENSION := .cc |
| 65 | LOCAL_CFLAGS += \ |
| 66 | -DGTEST_OS_LINUX \ |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 67 | -DGTEST_HAS_STD_STRING \ |
Tim Murray | 06fce9d | 2014-07-17 16:36:46 -0700 | [diff] [blame] | 68 | -Werror \ |
| 69 | -Wno-unnamed-type-template-args |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 70 | LOCAL_SRC_FILES := zip_archive_test.cc |
| 71 | LOCAL_STATIC_LIBRARIES := libziparchive-host \ |
| 72 | libz \ |
| 73 | libgtest_host \ |
| 74 | libgtest_main_host \ |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 75 | liblog \ |
| 76 | libutils |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 77 | include $(BUILD_HOST_NATIVE_TEST) |