blob: 32518d3fa8ae3c94330cf47d77c2702e0e50750a [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 bigbiffc7eee6f2014-09-02 18:59:01 -04006LOCAL_MODULE := libtwrpmtp
7LOCAL_MODULE_TAGS := optional
Motorhead1991e4449182014-09-10 19:17:06 -07008LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasing
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)
48
49# Build twrpmtp binary / executable
50
51include $(CLEAR_VARS)
52
53LOCAL_MODULE := twrpmtp
54LOCAL_MODULE_TAGS := optional
55LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -DTWRPMTP
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050056LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040057LOCAL_SRC_FILES = \
58 btree.cpp \
59 MtpDataPacket.cpp \
60 MtpDebug.cpp \
61 MtpDevice.cpp \
62 MtpDeviceInfo.cpp \
63 MtpEventPacket.cpp \
64 MtpObjectInfo.cpp \
65 MtpPacket.cpp \
66 MtpProperty.cpp \
67 MtpRequestPacket.cpp \
68 MtpResponsePacket.cpp \
69 MtpServer.cpp \
70 MtpStorage.cpp \
71 MtpStorageInfo.cpp \
72 MtpStringBuffer.cpp \
73 MtpUtils.cpp \
74 mtp_MtpServer.cpp \
75 twrpMtp.cpp \
76 mtp_MtpDatabase.cpp \
77 node.cpp
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050078LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040079include $(BUILD_EXECUTABLE)