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