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 |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 34 | include $(BUILD_STATIC_LIBRARY) |
| 35 | |
| 36 | include $(CLEAR_VARS) |
| 37 | LOCAL_MODULE := libziparchive |
| 38 | LOCAL_CPP_EXTENSION := .cc |
| 39 | LOCAL_SRC_FILES := ${source_files} |
| 40 | LOCAL_C_INCLUDES += ${includes} |
| 41 | |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 42 | LOCAL_STATIC_LIBRARIES := libz libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 43 | LOCAL_MODULE:= libziparchive-host |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 44 | LOCAL_CFLAGS := -Werror |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 45 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 46 | |
| 47 | include $(CLEAR_VARS) |
| 48 | LOCAL_MODULE := ziparchive-tests |
| 49 | LOCAL_CPP_EXTENSION := .cc |
| 50 | LOCAL_CFLAGS += \ |
| 51 | -DGTEST_OS_LINUX_ANDROID \ |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 52 | -DGTEST_HAS_STD_STRING \ |
| 53 | -Werror |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 54 | LOCAL_SRC_FILES := zip_archive_test.cc |
Narayan Kamath | 95986aa | 2014-01-03 15:40:37 +0000 | [diff] [blame] | 55 | LOCAL_SHARED_LIBRARIES := liblog |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 56 | LOCAL_STATIC_LIBRARIES := libziparchive libz libgtest libgtest_main libutils |
Narayan Kamath | 7462f02 | 2013-11-21 13:05:04 +0000 | [diff] [blame] | 57 | include $(BUILD_NATIVE_TEST) |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 58 | |
| 59 | include $(CLEAR_VARS) |
| 60 | LOCAL_MODULE := ziparchive-tests-host |
| 61 | LOCAL_CPP_EXTENSION := .cc |
| 62 | LOCAL_CFLAGS += \ |
| 63 | -DGTEST_OS_LINUX \ |
Mark Salyzyn | 51d562d | 2014-05-05 14:38:05 -0700 | [diff] [blame] | 64 | -DGTEST_HAS_STD_STRING \ |
| 65 | -Werror |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 66 | LOCAL_SRC_FILES := zip_archive_test.cc |
| 67 | LOCAL_STATIC_LIBRARIES := libziparchive-host \ |
| 68 | libz \ |
| 69 | libgtest_host \ |
| 70 | libgtest_main_host \ |
Narayan Kamath | eaf9885 | 2013-12-11 14:51:51 +0000 | [diff] [blame] | 71 | liblog \ |
| 72 | libutils |
Narayan Kamath | 58aaf46 | 2013-12-10 16:47:14 +0000 | [diff] [blame] | 73 | include $(BUILD_HOST_NATIVE_TEST) |