summaryrefslogtreecommitdiffstats
path: root/media/tests/mtp/Android.mk
blob: a9074eda936281afc35a63061f2d63842eddf28e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
LOCAL_PATH:= $(call my-dir)

ifneq ($(TARGET_SIMULATOR),true)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
	mtp.cpp \
	MtpFile.cpp \

LOCAL_C_INCLUDES += \
    frameworks/base/media/mtp \

LOCAL_CFLAGS := -DMTP_HOST

LOCAL_MODULE := mtp

LOCAL_STATIC_LIBRARIES := libmtp libusbhost libutils libcutils

include $(BUILD_EXECUTABLE)

endif

ifeq ($(HOST_OS),linux)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
	mtp.cpp \
	MtpFile.cpp \
	../../../libs/utils/RefBase.cpp \
	../../../libs/utils/SharedBuffer.cpp \
	../../../libs/utils/Threads.cpp \
	../../../libs/utils/VectorImpl.cpp \

LOCAL_C_INCLUDES += \
    frameworks/base/media/mtp \

LOCAL_CFLAGS := -DMTP_HOST -g -O0

have_readline := $(wildcard /usr/include/readline/readline.h)
have_history := $(wildcard /usr/lib/libhistory*)
ifneq ($(strip $(have_readline)),)
LOCAL_CFLAGS += -DHAVE_READLINE=1
endif

LOCAL_LDLIBS += -lpthread
ifneq ($(strip $(have_readline)),)
LOCAL_LDLIBS += -lreadline -lncurses
endif
ifneq ($(strip $(have_history)),)
LOCAL_LDLIBS += -lhistory
endif

LOCAL_MODULE := mtp

LOCAL_STATIC_LIBRARIES := libmtp libusbhost libcutils

include $(BUILD_HOST_EXECUTABLE)

endif