Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 1 | # Copyright 2005 The Android Open Source Project |
Tao Bao | 99f0d9e | 2016-10-13 12:46:38 -0700 | [diff] [blame] | 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. |
Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 14 | |
| 15 | LOCAL_PATH:= $(call my-dir) |
| 16 | |
Dan Albert | ffd6c31 | 2015-02-26 15:33:00 -0800 | [diff] [blame] | 17 | minadbd_cflags := \ |
| 18 | -Wall -Werror \ |
Dan Albert | ffd6c31 | 2015-02-26 15:33:00 -0800 | [diff] [blame] | 19 | -DADB_HOST=0 \ |
Ethan Yonker | 534d4e0 | 2016-08-26 10:05:03 -0500 | [diff] [blame] | 20 | -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) |
Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 21 | |
Tao Bao | f87d204 | 2017-11-15 11:26:06 -0800 | [diff] [blame] | 22 | # libminadbd (static library) |
Tao Bao | 99f0d9e | 2016-10-13 12:46:38 -0700 | [diff] [blame] | 23 | # =============================== |
Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 24 | include $(CLEAR_VARS) |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 25 | # ../fuse_sideload.cpp \ |
Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 26 | |
| 27 | LOCAL_SRC_FILES := \ |
Elliott Hughes | 20531ef | 2015-04-10 13:59:19 -0700 | [diff] [blame] | 28 | fuse_adb_provider.cpp \ |
Josh Gao | acb2a2f | 2016-08-26 18:24:34 -0700 | [diff] [blame] | 29 | minadbd.cpp \ |
Elliott Hughes | 24eb8a0 | 2016-06-15 15:12:17 -0700 | [diff] [blame] | 30 | minadbd_services.cpp \ |
Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 31 | |
Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 32 | LOCAL_MODULE := libminadbd |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 33 | LOCAL_CFLAGS := $(minadbd_cflags) -Wno-unused-parameter |
Dan Albert | ffd6c31 | 2015-02-26 15:33:00 -0800 | [diff] [blame] | 34 | LOCAL_CONLY_FLAGS := -Wimplicit-function-declaration |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 35 | LOCAL_CFLAGS += -std=gnu++2a |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 36 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. system/core/adb |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 37 | #LOCAL_WHOLE_STATIC_LIBRARIES := libadbd |
| 38 | LOCAL_SHARED_LIBRARIES := libadbd libbase liblog libcutils libc |
Ethan Yonker | 99af766 | 2016-09-15 14:48:29 -0500 | [diff] [blame] | 39 | |
| 40 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) |
| 41 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes |
| 42 | LOCAL_SHARED_LIBRARIES += libmincrypttwrp |
| 43 | LOCAL_CFLAGS += -DUSE_MINCRYPT |
| 44 | else |
D. Andrei Măceș | b29a5e2 | 2016-12-22 06:19:44 -0500 | [diff] [blame] | 45 | LOCAL_SHARED_LIBRARIES += libcrypto \ |
| 46 | $(if $(WITH_CRYPTO_UTILS),libcrypto_utils) |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 47 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 27; echo $$?),0) |
| 48 | # Needed in Android 9.0 |
| 49 | LOCAL_WHOLE_STATIC_LIBRARIES += libasyncio |
| 50 | endif |
Ethan Yonker | 99af766 | 2016-09-15 14:48:29 -0500 | [diff] [blame] | 51 | endif |
Doug Zongker | 9270a20 | 2012-01-09 15:16:13 -0800 | [diff] [blame] | 52 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 53 | ifeq ($shell test $(PLATFORM_SDK_VERSION) -lt 29; echo $$?),0) |
| 54 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../fuse_sideload28/ |
| 55 | else |
| 56 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../fuse_sideload/include |
| 57 | LOCAL_SHARED_LIBRARIES += libfusesideload |
| 58 | endif |
| 59 | |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 60 | include $(BUILD_SHARED_LIBRARY) |
Dan Albert | ffd6c31 | 2015-02-26 15:33:00 -0800 | [diff] [blame] | 61 | |
| 62 | include $(CLEAR_VARS) |
| 63 | |
Ethan Yonker | ea4efc6 | 2017-12-12 16:24:28 -0600 | [diff] [blame] | 64 | LOCAL_SRC_FILES := \ |
| 65 | fuse_adb_provider.cpp \ |
| 66 | ../fuse_sideload.cpp \ |
| 67 | minadbd.cpp \ |
| 68 | minadbd_services.cpp \ |
| 69 | |
| 70 | LOCAL_CLANG := true |
| 71 | LOCAL_MODULE := libminadbd |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 72 | LOCAL_CFLAGS := $(minadbd_cflags) -Wno-unused-parameter |
Ethan Yonker | ea4efc6 | 2017-12-12 16:24:28 -0600 | [diff] [blame] | 73 | LOCAL_CONLY_FLAGS := -Wimplicit-function-declaration |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 74 | LOCAL_CFLAGS += -std=gnu++2a |
Ethan Yonker | ea4efc6 | 2017-12-12 16:24:28 -0600 | [diff] [blame] | 75 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. system/core/adb |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 76 | LOCAL_SHARED_LIBRARIES := libadbd libbase liblog libcutils libc |
| 77 | #LOCAL_STATIC_LIBRARIES := libbase liblog libcutils libc |
| 78 | |
| 79 | ifeq ($shell test $(PLATFORM_SDK_VERSION) -lt 29; echo $$?),0) |
| 80 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../fuse_sideload28/ |
| 81 | else |
| 82 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/../fuse_sideload/include |
| 83 | endif |
Ethan Yonker | ea4efc6 | 2017-12-12 16:24:28 -0600 | [diff] [blame] | 84 | |
| 85 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) |
| 86 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes |
| 87 | LOCAL_SHARED_LIBRARIES += libmincrypttwrp |
| 88 | LOCAL_CFLAGS += -DUSE_MINCRYPT |
| 89 | else |
| 90 | LOCAL_SHARED_LIBRARIES += libcrypto \ |
| 91 | $(if $(WITH_CRYPTO_UTILS),libcrypto_utils) |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 92 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 27; echo $$?),0) |
| 93 | # Needed in Android 9.0 |
| 94 | LOCAL_WHOLE_STATIC_LIBRARIES += libasyncio |
| 95 | endif |
Ethan Yonker | ea4efc6 | 2017-12-12 16:24:28 -0600 | [diff] [blame] | 96 | endif |
| 97 | |
| 98 | include $(BUILD_STATIC_LIBRARY) |
| 99 | |
Tao Bao | 99f0d9e | 2016-10-13 12:46:38 -0700 | [diff] [blame] | 100 | # minadbd_test (native test) |
| 101 | # =============================== |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 102 | # include $(CLEAR_VARS) |
Ethan Yonker | ea4efc6 | 2017-12-12 16:24:28 -0600 | [diff] [blame] | 103 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 104 | # LOCAL_MODULE := minadbd_test |
| 105 | # LOCAL_COMPATIBILITY_SUITE := device-tests |
| 106 | # LOCAL_SRC_FILES := fuse_adb_provider_test.cpp |
| 107 | # LOCAL_CFLAGS := $(minadbd_cflags) |
| 108 | # LOCAL_C_INCLUDES := $(LOCAL_PATH) system/core/adb |
| 109 | # LOCAL_STATIC_LIBRARIES := \ |
| 110 | # libBionicGtestMain \ |
| 111 | # libminadbd |
| 112 | # LOCAL_SHARED_LIBRARIES := \ |
| 113 | # liblog \ |
| 114 | # libbase \ |
| 115 | # libcutils |
Dan Albert | ffd6c31 | 2015-02-26 15:33:00 -0800 | [diff] [blame] | 116 | |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 117 | # include $(BUILD_NATIVE_TEST) |