1# Copyright (C) 2008 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15LOCAL_PATH := $(call my-dir) 16 17# Common project flags. 18bsdiff_common_cflags := \ 19 -D_FILE_OFFSET_BITS=64 \ 20 -Wall \ 21 -Werror \ 22 -Wextra \ 23 -Wno-unused-parameter 24 25bsdiff_common_static_libs := \ 26 libbz 27 28bsdiff_common_unittests := \ 29 bsdiff_unittest.cc \ 30 extents_file_unittest.cc \ 31 extents_unittest.cc \ 32 test_utils.cc 33 34# "bsdiff" program. 35bsdiff_shared_libs := \ 36 libdivsufsort64 \ 37 libdivsufsort 38 39bsdiff_src_files := \ 40 bsdiff.cc 41 42# "bspatch" program. 43bspatch_src_files := \ 44 bspatch.cc \ 45 extents.cc \ 46 extents_file.cc \ 47 file.cc 48 49# Target executables. 50 51include $(CLEAR_VARS) 52LOCAL_MODULE := bspatch 53LOCAL_CPP_EXTENSION := .cc 54LOCAL_SRC_FILES := \ 55 $(bspatch_src_files) \ 56 bspatch_main.cc 57LOCAL_CFLAGS := $(bsdiff_common_cflags) 58LOCAL_C_INCLUDES += external/bzip2 59LOCAL_STATIC_LIBRARIES := $(bsdiff_common_static_libs) 60include $(BUILD_EXECUTABLE) 61 62 63# Host executables. 64 65include $(CLEAR_VARS) 66LOCAL_MODULE := bsdiff 67LOCAL_CPP_EXTENSION := .cc 68LOCAL_SRC_FILES := \ 69 $(bsdiff_src_files) \ 70 bsdiff_main.cc 71LOCAL_CFLAGS := $(bsdiff_common_cflags) 72LOCAL_C_INCLUDES += external/bzip2 73LOCAL_STATIC_LIBRARIES := $(bsdiff_common_static_libs) 74LOCAL_SHARED_LIBRARIES := $(bsdiff_shared_libs) 75include $(BUILD_HOST_EXECUTABLE) 76 77include $(CLEAR_VARS) 78LOCAL_MODULE := bspatch 79LOCAL_CPP_EXTENSION := .cc 80LOCAL_SRC_FILES := \ 81 $(bspatch_src_files) \ 82 bspatch_main.cc 83LOCAL_CFLAGS := $(bsdiff_common_cflags) 84LOCAL_C_INCLUDES += external/bzip2 85LOCAL_STATIC_LIBRARIES := $(bsdiff_common_static_libs) 86include $(BUILD_HOST_EXECUTABLE) 87 88include $(CLEAR_VARS) 89LOCAL_MODULE := bsdiff_unittest 90LOCAL_MODULE_TAGS := debug tests 91LOCAL_CPP_EXTENSION := .cc 92LOCAL_SRC_FILES := \ 93 $(bsdiff_src_files) \ 94 $(bspatch_src_files) \ 95 $(bsdiff_common_unittests) \ 96 testrunner.cc 97LOCAL_CFLAGS := $(bsdiff_common_cflags) 98LOCAL_C_INCLUDES += external/bzip2 99LOCAL_STATIC_LIBRARIES := \ 100 $(bsdiff_common_static_libs) \ 101 libgtest_host \ 102 libgmock_host 103LOCAL_SHARED_LIBRARIES := $(bsdiff_shared_libs) 104include $(BUILD_HOST_EXECUTABLE) 105