blob: c6a7fb7db9b65d788cf9c0da55e322b0178a1809 [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
43
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040044include $(BUILD_SHARED_LIBRARY)
45
46# Build twrpmtp binary / executable
47
48include $(CLEAR_VARS)
49
50LOCAL_MODULE := twrpmtp
51LOCAL_MODULE_TAGS := optional
52LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -DTWRPMTP
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050053LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040054LOCAL_SRC_FILES = \
55 btree.cpp \
56 MtpDataPacket.cpp \
57 MtpDebug.cpp \
58 MtpDevice.cpp \
59 MtpDeviceInfo.cpp \
60 MtpEventPacket.cpp \
61 MtpObjectInfo.cpp \
62 MtpPacket.cpp \
63 MtpProperty.cpp \
64 MtpRequestPacket.cpp \
65 MtpResponsePacket.cpp \
66 MtpServer.cpp \
67 MtpStorage.cpp \
68 MtpStorageInfo.cpp \
69 MtpStringBuffer.cpp \
70 MtpUtils.cpp \
71 mtp_MtpServer.cpp \
72 twrpMtp.cpp \
73 mtp_MtpDatabase.cpp \
74 node.cpp
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050075LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040076include $(BUILD_EXECUTABLE)