bigbiff bigbiff | af32bb9 | 2018-12-18 18:39:53 -0500 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | # Build libtwrpmtp library |
| 4 | |
| 5 | include $(CLEAR_VARS) |
| 6 | LOCAL_MODULE := libtwrpmtp-ffs |
| 7 | LOCAL_MODULE_TAGS := optional |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 8 | LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasing \ |
| 9 | -Wno-unused-variable -Wno-format -Wno-unused-parameter -Wno-unused-private-field \ |
| 10 | -Wno-implicit-fallthrough |
| 11 | LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic \ |
| 12 | frameworks/base/include \ |
| 13 | system/core/include \ |
| 14 | bionic/libc/private/ \ |
| 15 | bootable/recovery/twrplibusbhost/include \ |
bigbiff | 1f9e484 | 2020-10-31 11:33:15 -0400 | [diff] [blame] | 16 | bootable/recovery/twrpinstall/include |
bigbiff | d58ba18 | 2020-03-23 10:02:29 -0400 | [diff] [blame] | 17 | |
bigbiff | 1f9e484 | 2020-10-31 11:33:15 -0400 | [diff] [blame] | 18 | LOCAL_SHARED_LIBRARIES += libc++ |
| 19 | LOCAL_STATIC_LIBRARIES += libtwrpinstall |
bigbiff bigbiff | af32bb9 | 2018-12-18 18:39:53 -0500 | [diff] [blame] | 20 | |
| 21 | LOCAL_SRC_FILES = \ |
| 22 | MtpDataPacket.cpp \ |
| 23 | MtpDebug.cpp \ |
| 24 | MtpDevice.cpp \ |
| 25 | MtpDevHandle.cpp \ |
| 26 | MtpDeviceInfo.cpp \ |
| 27 | MtpEventPacket.cpp \ |
| 28 | MtpObjectInfo.cpp \ |
| 29 | MtpPacket.cpp \ |
| 30 | MtpProperty.cpp \ |
| 31 | MtpRequestPacket.cpp \ |
| 32 | MtpResponsePacket.cpp \ |
| 33 | MtpServer.cpp \ |
| 34 | MtpStorage.cpp \ |
| 35 | MtpStorageInfo.cpp \ |
| 36 | MtpStringBuffer.cpp \ |
| 37 | MtpUtils.cpp \ |
| 38 | mtp_MtpServer.cpp \ |
| 39 | btree.cpp \ |
| 40 | twrpMtp.cpp \ |
| 41 | mtp_MtpDatabase.cpp \ |
| 42 | node.cpp |
| 43 | |
| 44 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0) |
| 45 | LOCAL_CFLAGS += -D_FFS_DEVICE |
| 46 | LOCAL_SHARED_LIBRARIES += libasyncio |
| 47 | LOCAL_SRC_FILES += \ |
| 48 | MtpDescriptors.cpp \ |
| 49 | MtpFfsHandle.cpp \ |
| 50 | MtpFfsCompatHandle.cpp \ |
| 51 | PosixAsyncIO.cpp |
| 52 | endif |
| 53 | |
| 54 | LOCAL_SHARED_LIBRARIES += libz \ |
| 55 | libc \ |
| 56 | libusbhost \ |
| 57 | libstdc++ \ |
| 58 | libdl \ |
| 59 | libcutils \ |
| 60 | libutils \ |
bigbiff bigbiff | af32bb9 | 2018-12-18 18:39:53 -0500 | [diff] [blame] | 61 | libselinux \ |
James Wei | 471fff5 | 2019-05-28 17:18:21 +0800 | [diff] [blame^] | 62 | libbase \ |
| 63 | liblog |
bigbiff bigbiff | af32bb9 | 2018-12-18 18:39:53 -0500 | [diff] [blame] | 64 | |
| 65 | LOCAL_C_INCLUDES += bootable/recovery/twrplibusbhost/include |
| 66 | |
| 67 | ifneq ($(TW_MTP_DEVICE),) |
| 68 | LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE) |
| 69 | endif |
| 70 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0) |
| 71 | LOCAL_CFLAGS += -DHAS_USBHOST_TIMEOUT |
| 72 | endif |
| 73 | |
| 74 | include $(BUILD_SHARED_LIBRARY) |