build: Fix Android and Xcode compilation errors/warnings
[platform/upstream/libusb.git] / android / jni / examples.mk
1 # Android build config for libusb examples
2 # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 #
18
19 LOCAL_PATH := $(call my-dir)
20 LIBUSB_ROOT_REL := ../..
21 LIBUSB_ROOT_ABS := $(LOCAL_PATH)/../..
22
23 # dpfp
24
25 include $(CLEAR_VARS)
26
27 LOCAL_SRC_FILES := \
28   $(LIBUSB_ROOT_REL)/examples/dpfp.c
29
30 LOCAL_C_INCLUDES += \
31   $(LOCAL_PATH)/.. \
32   $(LIBUSB_ROOT_ABS)
33
34 LOCAL_SHARED_LIBRARIES += libusb1.0
35
36 LOCAL_MODULE := dpfp
37
38 include $(BUILD_EXECUTABLE)
39
40 # dpfp_threaded
41
42 include $(CLEAR_VARS)
43
44 LOCAL_SRC_FILES := \
45   $(LIBUSB_ROOT_REL)/examples/dpfp.c
46
47 LOCAL_C_INCLUDES += \
48   $(LOCAL_PATH)/.. \
49   $(LIBUSB_ROOT_ABS)
50
51 LOCAL_CFLAGS := -DDPFP_THREADED -pthread
52
53 LOCAL_SHARED_LIBRARIES += libusb1.0
54
55 LOCAL_MODULE := dpfp_threaded
56
57 include $(BUILD_EXECUTABLE)
58
59 # fxload
60
61 include $(CLEAR_VARS)
62
63 LOCAL_SRC_FILES := \
64   $(LIBUSB_ROOT_REL)/examples/ezusb.c \
65   $(LIBUSB_ROOT_REL)/examples/fxload.c
66
67 LOCAL_C_INCLUDES += \
68   $(LOCAL_PATH)/.. \
69   $(LIBUSB_ROOT_ABS)
70
71 LOCAL_SHARED_LIBRARIES += libusb1.0
72
73 LOCAL_MODULE := fxload
74
75 include $(BUILD_EXECUTABLE)
76
77 # hotplugtest
78
79 include $(CLEAR_VARS)
80
81 LOCAL_SRC_FILES := \
82   $(LIBUSB_ROOT_REL)/examples/hotplugtest.c
83
84 LOCAL_C_INCLUDES += \
85   $(LOCAL_PATH)/.. \
86   $(LIBUSB_ROOT_ABS)
87
88 LOCAL_SHARED_LIBRARIES += libusb1.0
89
90 LOCAL_MODULE := hotplugtest
91
92 include $(BUILD_EXECUTABLE)
93
94 # listdevs
95
96 include $(CLEAR_VARS)
97
98 LOCAL_SRC_FILES := \
99   $(LIBUSB_ROOT_REL)/examples/listdevs.c
100
101 LOCAL_C_INCLUDES += \
102   $(LOCAL_PATH)/.. \
103   $(LIBUSB_ROOT_ABS)
104
105 LOCAL_SHARED_LIBRARIES += libusb1.0
106
107 LOCAL_MODULE := listdevs
108
109 include $(BUILD_EXECUTABLE)
110
111 # sam3u_benchmark
112
113 include $(CLEAR_VARS)
114
115 LOCAL_SRC_FILES := \
116   $(LIBUSB_ROOT_REL)/examples/sam3u_benchmark.c
117
118 LOCAL_C_INCLUDES += \
119   $(LOCAL_PATH)/.. \
120   $(LIBUSB_ROOT_ABS)
121
122 LOCAL_SHARED_LIBRARIES += libusb1.0
123
124 LOCAL_MODULE := sam3u_benchmark
125
126 include $(BUILD_EXECUTABLE)
127
128 # xusb
129
130 include $(CLEAR_VARS)
131
132 LOCAL_SRC_FILES := \
133   $(LIBUSB_ROOT_REL)/examples/xusb.c
134
135 LOCAL_C_INCLUDES += \
136   $(LOCAL_PATH)/.. \
137   $(LIBUSB_ROOT_ABS)
138
139 LOCAL_SHARED_LIBRARIES += libusb1.0
140
141 LOCAL_MODULE := xusb
142
143 include $(BUILD_EXECUTABLE)