bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | # Build libtwrpmtp library |
| 4 | |
| 5 | include $(CLEAR_VARS) |
bigbiff bigbiff | af32bb9 | 2018-12-18 18:39:53 -0500 | [diff] [blame] | 6 | LOCAL_MODULE := libtwrpmtp-legacy |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 7 | LOCAL_MODULE_TAGS := optional |
Ethan Yonker | e9afc3d | 2018-08-30 15:16:27 -0500 | [diff] [blame] | 8 | LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasing -Wno-unused-variable -Wno-format -Wno-unused-parameter -Wno-unused-private-field |
Xing | 0af1ac1 | 2015-11-27 11:19:37 -0800 | [diff] [blame] | 9 | LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/ |
| 10 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
| 11 | LOCAL_C_INCLUDES += external/stlport/stlport |
Ethan Yonker | 534d4e0 | 2016-08-26 10:05:03 -0500 | [diff] [blame] | 12 | LOCAL_SHARED_LIBRARIES += libstlport |
| 13 | else |
| 14 | LOCAL_SHARED_LIBRARIES += libc++ |
Xing | 0af1ac1 | 2015-11-27 11:19:37 -0800 | [diff] [blame] | 15 | endif |
| 16 | |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 17 | LOCAL_SRC_FILES = \ |
| 18 | btree.cpp \ |
| 19 | MtpDataPacket.cpp \ |
| 20 | MtpDebug.cpp \ |
| 21 | MtpDevice.cpp \ |
| 22 | MtpDeviceInfo.cpp \ |
| 23 | MtpEventPacket.cpp \ |
| 24 | MtpObjectInfo.cpp \ |
| 25 | MtpPacket.cpp \ |
| 26 | MtpProperty.cpp \ |
| 27 | MtpRequestPacket.cpp \ |
| 28 | MtpResponsePacket.cpp \ |
| 29 | MtpServer.cpp \ |
| 30 | MtpStorage.cpp \ |
| 31 | MtpStorageInfo.cpp \ |
| 32 | MtpStringBuffer.cpp \ |
| 33 | MtpUtils.cpp \ |
| 34 | mtp_MtpServer.cpp \ |
| 35 | twrpMtp.cpp \ |
| 36 | mtp_MtpDatabase.cpp \ |
| 37 | node.cpp |
Ethan Yonker | 34ae483 | 2016-08-24 15:32:18 -0500 | [diff] [blame] | 38 | LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery libselinux |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 39 | |
Ethan Yonker | a1f3805 | 2014-09-11 08:28:51 -0500 | [diff] [blame] | 40 | ifneq ($(TW_MTP_DEVICE),) |
| 41 | LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE) |
| 42 | endif |
Ethan Yonker | 95e8007 | 2017-08-24 21:45:50 -0500 | [diff] [blame] | 43 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0) |
| 44 | LOCAL_CFLAGS += -DHAS_USBHOST_TIMEOUT |
| 45 | endif |
Ethan Yonker | a1f3805 | 2014-09-11 08:28:51 -0500 | [diff] [blame] | 46 | |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 47 | include $(BUILD_SHARED_LIBRARY) |