blob: a50d8444fd90191596598a7013e51a430ffd1171 [file] [log] [blame]
Doug Zongker9270a202012-01-09 15:16:13 -08001# Copyright 2005 The Android Open Source Project
Tao Bao99f0d9e2016-10-13 12:46:38 -07002#
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 Zongker9270a202012-01-09 15:16:13 -080014
15LOCAL_PATH:= $(call my-dir)
16
Dan Albertffd6c312015-02-26 15:33:00 -080017minadbd_cflags := \
18 -Wall -Werror \
Dan Albertffd6c312015-02-26 15:33:00 -080019 -DADB_HOST=0 \
Ethan Yonker534d4e02016-08-26 10:05:03 -050020 -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
Doug Zongker9270a202012-01-09 15:16:13 -080021
Tao Baof87d2042017-11-15 11:26:06 -080022# libminadbd (static library)
Tao Bao99f0d9e2016-10-13 12:46:38 -070023# ===============================
Doug Zongker9270a202012-01-09 15:16:13 -080024include $(CLEAR_VARS)
25
26LOCAL_SRC_FILES := \
Elliott Hughes20531ef2015-04-10 13:59:19 -070027 fuse_adb_provider.cpp \
Ethan Yonker8373cfe2017-09-08 06:50:54 -050028 ../fuse_sideload.cpp \
Josh Gaoacb2a2f2016-08-26 18:24:34 -070029 minadbd.cpp \
Elliott Hughes24eb8a02016-06-15 15:12:17 -070030 minadbd_services.cpp \
Doug Zongker9270a202012-01-09 15:16:13 -080031
Doug Zongker9270a202012-01-09 15:16:13 -080032LOCAL_MODULE := libminadbd
Ethan Yonker58f21322018-08-24 11:17:36 -050033LOCAL_CFLAGS := $(minadbd_cflags) -Wno-unused-parameter
Dan Albertffd6c312015-02-26 15:33:00 -080034LOCAL_CONLY_FLAGS := -Wimplicit-function-declaration
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050035LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. system/core/adb
Dan Albertf3a57262015-02-19 13:21:14 -080036LOCAL_WHOLE_STATIC_LIBRARIES := libadbd
Ethan Yonker99af7662016-09-15 14:48:29 -050037LOCAL_SHARED_LIBRARIES := libbase liblog libcutils libc
38
39ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
40 LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
41 LOCAL_SHARED_LIBRARIES += libmincrypttwrp
42 LOCAL_CFLAGS += -DUSE_MINCRYPT
43else
D. Andrei Măceșb29a5e22016-12-22 06:19:44 -050044 LOCAL_SHARED_LIBRARIES += libcrypto \
45 $(if $(WITH_CRYPTO_UTILS),libcrypto_utils)
Ethan Yonker58f21322018-08-24 11:17:36 -050046 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 27; echo $$?),0)
47 # Needed in Android 9.0
48 LOCAL_WHOLE_STATIC_LIBRARIES += libasyncio
49 endif
Ethan Yonker99af7662016-09-15 14:48:29 -050050endif
Doug Zongker9270a202012-01-09 15:16:13 -080051
Dees_Troy2673cec2013-04-02 20:22:16 +000052include $(BUILD_SHARED_LIBRARY)
Dan Albertffd6c312015-02-26 15:33:00 -080053
54include $(CLEAR_VARS)
55
Ethan Yonkerea4efc62017-12-12 16:24:28 -060056LOCAL_SRC_FILES := \
57 fuse_adb_provider.cpp \
58 ../fuse_sideload.cpp \
59 minadbd.cpp \
60 minadbd_services.cpp \
61
62LOCAL_CLANG := true
63LOCAL_MODULE := libminadbd
Ethan Yonker58f21322018-08-24 11:17:36 -050064LOCAL_CFLAGS := $(minadbd_cflags) -Wno-unused-parameter
Ethan Yonkerea4efc62017-12-12 16:24:28 -060065LOCAL_CONLY_FLAGS := -Wimplicit-function-declaration
66LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. system/core/adb
67LOCAL_WHOLE_STATIC_LIBRARIES := libadbd
68LOCAL_STATIC_LIBRARIES := libbase liblog libcutils libc
69
70ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
71 LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
72 LOCAL_SHARED_LIBRARIES += libmincrypttwrp
73 LOCAL_CFLAGS += -DUSE_MINCRYPT
74else
75 LOCAL_SHARED_LIBRARIES += libcrypto \
76 $(if $(WITH_CRYPTO_UTILS),libcrypto_utils)
Ethan Yonker58f21322018-08-24 11:17:36 -050077 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 27; echo $$?),0)
78 # Needed in Android 9.0
79 LOCAL_WHOLE_STATIC_LIBRARIES += libasyncio
80 endif
Ethan Yonkerea4efc62017-12-12 16:24:28 -060081endif
82
83include $(BUILD_STATIC_LIBRARY)
84
Tao Bao99f0d9e2016-10-13 12:46:38 -070085# minadbd_test (native test)
86# ===============================
Ethan Yonkerea4efc62017-12-12 16:24:28 -060087include $(CLEAR_VARS)
88
Dan Albertffd6c312015-02-26 15:33:00 -080089LOCAL_MODULE := minadbd_test
Dan Shi73683162017-03-28 17:22:41 -070090LOCAL_COMPATIBILITY_SUITE := device-tests
Dan Albertffd6c312015-02-26 15:33:00 -080091LOCAL_SRC_FILES := fuse_adb_provider_test.cpp
92LOCAL_CFLAGS := $(minadbd_cflags)
93LOCAL_C_INCLUDES := $(LOCAL_PATH) system/core/adb
Tianjie Xua88cc542017-10-25 13:16:54 -070094LOCAL_STATIC_LIBRARIES := \
95 libBionicGtestMain \
96 libminadbd
97LOCAL_SHARED_LIBRARIES := \
98 liblog \
99 libbase \
100 libcutils
Dan Albertffd6c312015-02-26 15:33:00 -0800101
102include $(BUILD_NATIVE_TEST)