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 \ |
| 16 | bootable/recovery/install/include |
| 17 | |
| 18 | LOCAL_SHARED_LIBRARIES += libc++ libaosprecovery |
bigbiff bigbiff | af32bb9 | 2018-12-18 18:39:53 -0500 | [diff] [blame] | 19 | |
| 20 | LOCAL_SRC_FILES = \ |
| 21 | MtpDataPacket.cpp \ |
| 22 | MtpDebug.cpp \ |
| 23 | MtpDevice.cpp \ |
| 24 | MtpDevHandle.cpp \ |
| 25 | MtpDeviceInfo.cpp \ |
| 26 | MtpEventPacket.cpp \ |
| 27 | MtpObjectInfo.cpp \ |
| 28 | MtpPacket.cpp \ |
| 29 | MtpProperty.cpp \ |
| 30 | MtpRequestPacket.cpp \ |
| 31 | MtpResponsePacket.cpp \ |
| 32 | MtpServer.cpp \ |
| 33 | MtpStorage.cpp \ |
| 34 | MtpStorageInfo.cpp \ |
| 35 | MtpStringBuffer.cpp \ |
| 36 | MtpUtils.cpp \ |
| 37 | mtp_MtpServer.cpp \ |
| 38 | btree.cpp \ |
| 39 | twrpMtp.cpp \ |
| 40 | mtp_MtpDatabase.cpp \ |
| 41 | node.cpp |
| 42 | |
| 43 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0) |
| 44 | LOCAL_CFLAGS += -D_FFS_DEVICE |
| 45 | LOCAL_SHARED_LIBRARIES += libasyncio |
| 46 | LOCAL_SRC_FILES += \ |
| 47 | MtpDescriptors.cpp \ |
| 48 | MtpFfsHandle.cpp \ |
| 49 | MtpFfsCompatHandle.cpp \ |
| 50 | PosixAsyncIO.cpp |
| 51 | endif |
| 52 | |
| 53 | LOCAL_SHARED_LIBRARIES += libz \ |
| 54 | libc \ |
| 55 | libusbhost \ |
| 56 | libstdc++ \ |
| 57 | libdl \ |
| 58 | libcutils \ |
| 59 | libutils \ |
bigbiff bigbiff | af32bb9 | 2018-12-18 18:39:53 -0500 | [diff] [blame] | 60 | libselinux \ |
| 61 | libbase |
| 62 | |
| 63 | LOCAL_C_INCLUDES += bootable/recovery/twrplibusbhost/include |
| 64 | |
| 65 | ifneq ($(TW_MTP_DEVICE),) |
| 66 | LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE) |
| 67 | endif |
| 68 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0) |
| 69 | LOCAL_CFLAGS += -DHAS_USBHOST_TIMEOUT |
| 70 | endif |
| 71 | |
| 72 | include $(BUILD_SHARED_LIBRARY) |