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) |
| 6 | |
| 7 | LOCAL_MODULE := libtwrpmtp |
| 8 | LOCAL_MODULE_TAGS := optional |
Motorhead1991 | e444918 | 2014-09-10 19:17:06 -0700 | [diff] [blame] | 9 | LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasing |
Xing | 0af1ac1 | 2015-11-27 11:19:37 -0800 | [diff] [blame] | 10 | LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/ |
| 11 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
| 12 | LOCAL_C_INCLUDES += external/stlport/stlport |
| 13 | endif |
| 14 | |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 15 | LOCAL_SRC_FILES = \ |
| 16 | btree.cpp \ |
| 17 | MtpDataPacket.cpp \ |
| 18 | MtpDebug.cpp \ |
| 19 | MtpDevice.cpp \ |
| 20 | MtpDeviceInfo.cpp \ |
| 21 | MtpEventPacket.cpp \ |
| 22 | MtpObjectInfo.cpp \ |
| 23 | MtpPacket.cpp \ |
| 24 | MtpProperty.cpp \ |
| 25 | MtpRequestPacket.cpp \ |
| 26 | MtpResponsePacket.cpp \ |
| 27 | MtpServer.cpp \ |
| 28 | MtpStorage.cpp \ |
| 29 | MtpStorageInfo.cpp \ |
| 30 | MtpStringBuffer.cpp \ |
| 31 | MtpUtils.cpp \ |
| 32 | mtp_MtpServer.cpp \ |
| 33 | twrpMtp.cpp \ |
| 34 | mtp_MtpDatabase.cpp \ |
| 35 | node.cpp |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 36 | LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery |
| 37 | |
Xing | 0af1ac1 | 2015-11-27 11:19:37 -0800 | [diff] [blame] | 38 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 39 | LOCAL_SHARED_LIBRARIES += libstlport |
| 40 | else |
| 41 | LOCAL_SHARED_LIBRARIES += libc++ |
| 42 | endif |
Ethan Yonker | a1f3805 | 2014-09-11 08:28:51 -0500 | [diff] [blame] | 43 | |
| 44 | ifneq ($(TW_MTP_DEVICE),) |
| 45 | LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE) |
| 46 | endif |
| 47 | |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 48 | include $(BUILD_SHARED_LIBRARY) |
| 49 | |
| 50 | # Build twrpmtp binary / executable |
| 51 | |
| 52 | include $(CLEAR_VARS) |
| 53 | |
| 54 | LOCAL_MODULE := twrpmtp |
| 55 | LOCAL_MODULE_TAGS := optional |
| 56 | LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -DTWRPMTP |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 57 | LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/ |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 58 | LOCAL_SRC_FILES = \ |
| 59 | btree.cpp \ |
| 60 | MtpDataPacket.cpp \ |
| 61 | MtpDebug.cpp \ |
| 62 | MtpDevice.cpp \ |
| 63 | MtpDeviceInfo.cpp \ |
| 64 | MtpEventPacket.cpp \ |
| 65 | MtpObjectInfo.cpp \ |
| 66 | MtpPacket.cpp \ |
| 67 | MtpProperty.cpp \ |
| 68 | MtpRequestPacket.cpp \ |
| 69 | MtpResponsePacket.cpp \ |
| 70 | MtpServer.cpp \ |
| 71 | MtpStorage.cpp \ |
| 72 | MtpStorageInfo.cpp \ |
| 73 | MtpStringBuffer.cpp \ |
| 74 | MtpUtils.cpp \ |
| 75 | mtp_MtpServer.cpp \ |
| 76 | twrpMtp.cpp \ |
| 77 | mtp_MtpDatabase.cpp \ |
| 78 | node.cpp |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 79 | LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 80 | include $(BUILD_EXECUTABLE) |