blob: cd04ac018c51e2696a276598e93a2751846cd879 [file] [log] [blame]
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -04001LOCAL_PATH := $(call my-dir)
2
3# Build libtwrpmtp library
4
5include $(CLEAR_VARS)
bigbiff bigbiffaf32bb92018-12-18 18:39:53 -05006LOCAL_MODULE := libtwrpmtp-legacy
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -04007LOCAL_MODULE_TAGS := optional
Ethan Yonkere9afc3d2018-08-30 15:16:27 -05008LOCAL_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
Xing0af1ac12015-11-27 11:19:37 -08009LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/
10ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
11 LOCAL_C_INCLUDES += external/stlport/stlport
Ethan Yonker534d4e02016-08-26 10:05:03 -050012 LOCAL_SHARED_LIBRARIES += libstlport
13else
14 LOCAL_SHARED_LIBRARIES += libc++
Xing0af1ac12015-11-27 11:19:37 -080015endif
16
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040017LOCAL_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 Yonker34ae4832016-08-24 15:32:18 -050038LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery libselinux
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050039
Ethan Yonkera1f38052014-09-11 08:28:51 -050040ifneq ($(TW_MTP_DEVICE),)
41 LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
42endif
Ethan Yonker95e80072017-08-24 21:45:50 -050043ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
44 LOCAL_CFLAGS += -DHAS_USBHOST_TIMEOUT
45endif
Ethan Yonkera1f38052014-09-11 08:28:51 -050046
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040047include $(BUILD_SHARED_LIBRARY)