blob: 57f0ae35ed72071368729ce0082ae81e438b15ac [file] [log] [blame]
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -04001LOCAL_PATH := $(call my-dir)
2
3# Build libtwrpmtp library
4
5include $(CLEAR_VARS)
6
7LOCAL_MODULE := libtwrpmtp
8LOCAL_MODULE_TAGS := optional
Motorhead1991e4449182014-09-10 19:17:06 -07009LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -fno-strict-aliasing
Xing0af1ac12015-11-27 11:19:37 -080010LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/
11ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
12 LOCAL_C_INCLUDES += external/stlport/stlport
13endif
14
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040015LOCAL_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 Yonkerc798c9c2015-10-09 11:15:26 -050036LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery
37
Xing0af1ac12015-11-27 11:19:37 -080038ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050039 LOCAL_SHARED_LIBRARIES += libstlport
40else
41 LOCAL_SHARED_LIBRARIES += libc++
42endif
Ethan Yonkera1f38052014-09-11 08:28:51 -050043
44ifneq ($(TW_MTP_DEVICE),)
45 LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
46endif
47
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040048include $(BUILD_SHARED_LIBRARY)
49
50# Build twrpmtp binary / executable
51
52include $(CLEAR_VARS)
53
54LOCAL_MODULE := twrpmtp
55LOCAL_MODULE_TAGS := optional
56LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 -DMTP_DEVICE -DMTP_HOST -DTWRPMTP
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050057LOCAL_C_INCLUDES += $(LOCAL_PATH) bionic frameworks/base/include system/core/include bionic/libc/private/
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040058LOCAL_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 Yonkerc798c9c2015-10-09 11:15:26 -050079LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040080include $(BUILD_EXECUTABLE)