blob: e754c3b293a5f1a2e6141980c4b369a631eff42b [file] [log] [blame]
Narayan Kamath7462f022013-11-21 13:05:04 +00001#
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
Narayan Kamatheaf98852013-12-11 14:51:51 +000029LOCAL_SHARED_LIBRARIES := libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000030LOCAL_MODULE:= libziparchive
31
32LOCAL_C_INCLUDES += ${includes}
33include $(BUILD_STATIC_LIBRARY)
34
35include $(CLEAR_VARS)
36LOCAL_MODULE := libziparchive
37LOCAL_CPP_EXTENSION := .cc
38LOCAL_SRC_FILES := ${source_files}
39LOCAL_C_INCLUDES += ${includes}
40
Narayan Kamatheaf98852013-12-11 14:51:51 +000041LOCAL_STATIC_LIBRARIES := libz libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000042LOCAL_MODULE:= libziparchive-host
43include $(BUILD_HOST_STATIC_LIBRARY)
44
45include $(CLEAR_VARS)
46LOCAL_MODULE := ziparchive-tests
47LOCAL_CPP_EXTENSION := .cc
48LOCAL_CFLAGS += \
49 -DGTEST_OS_LINUX_ANDROID \
50 -DGTEST_HAS_STD_STRING
51LOCAL_SRC_FILES := zip_archive_test.cc
Narayan Kamath95986aa2014-01-03 15:40:37 +000052LOCAL_SHARED_LIBRARIES := liblog
Narayan Kamatheaf98852013-12-11 14:51:51 +000053LOCAL_STATIC_LIBRARIES := libziparchive libz libgtest libgtest_main libutils
Narayan Kamath7462f022013-11-21 13:05:04 +000054include $(BUILD_NATIVE_TEST)
Narayan Kamath58aaf462013-12-10 16:47:14 +000055
56include $(CLEAR_VARS)
57LOCAL_MODULE := ziparchive-tests-host
58LOCAL_CPP_EXTENSION := .cc
59LOCAL_CFLAGS += \
60 -DGTEST_OS_LINUX \
61 -DGTEST_HAS_STD_STRING
62LOCAL_SRC_FILES := zip_archive_test.cc
63LOCAL_STATIC_LIBRARIES := libziparchive-host \
64 libz \
65 libgtest_host \
66 libgtest_main_host \
Narayan Kamatheaf98852013-12-11 14:51:51 +000067 liblog \
68 libutils
Narayan Kamath58aaf462013-12-10 16:47:14 +000069include $(BUILD_HOST_NATIVE_TEST)