blob: 34514b8c8d924cc763223fc538cdf6b7fccecc68 [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
12endif
13
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040014LOCAL_SRC_FILES = \
15 btree.cpp \
16 MtpDataPacket.cpp \
17 MtpDebug.cpp \
18 MtpDevice.cpp \
19 MtpDeviceInfo.cpp \
20 MtpEventPacket.cpp \
21 MtpObjectInfo.cpp \
22 MtpPacket.cpp \
23 MtpProperty.cpp \
24 MtpRequestPacket.cpp \
25 MtpResponsePacket.cpp \
26 MtpServer.cpp \
27 MtpStorage.cpp \
28 MtpStorageInfo.cpp \
29 MtpStringBuffer.cpp \
30 MtpUtils.cpp \
31 mtp_MtpServer.cpp \
32 twrpMtp.cpp \
33 mtp_MtpDatabase.cpp \
34 node.cpp
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050035LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libdl libcutils libutils libaosprecovery
36
Xing0af1ac12015-11-27 11:19:37 -080037ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050038 LOCAL_SHARED_LIBRARIES += libstlport
39else
40 LOCAL_SHARED_LIBRARIES += libc++
41endif
Ethan Yonkera1f38052014-09-11 08:28:51 -050042
43ifneq ($(TW_MTP_DEVICE),)
44 LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
45endif
46
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)