• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
19LOCAL_PATH := $(call my-dir)
20LIBUSB_ROOT_REL := ../..
21LIBUSB_ROOT_ABS := $(LOCAL_PATH)/../..
22
23# dpfp
24
25include $(CLEAR_VARS)
26
27LOCAL_SRC_FILES := \
28  $(LIBUSB_ROOT_REL)/examples/dpfp.c
29
30LOCAL_C_INCLUDES += \
31  $(LOCAL_PATH)/.. \
32  $(LIBUSB_ROOT_ABS)
33
34LOCAL_SHARED_LIBRARIES += libusb1.0
35
36LOCAL_MODULE := dpfp
37
38include $(BUILD_EXECUTABLE)
39
40# dpfp_threaded
41
42include $(CLEAR_VARS)
43
44LOCAL_SRC_FILES := \
45  $(LIBUSB_ROOT_REL)/examples/dpfp.c
46
47LOCAL_C_INCLUDES += \
48  $(LOCAL_PATH)/.. \
49  $(LIBUSB_ROOT_ABS)
50
51LOCAL_CFLAGS := -DDPFP_THREADED -pthread
52
53LOCAL_SHARED_LIBRARIES += libusb1.0
54
55LOCAL_MODULE := dpfp_threaded
56
57include $(BUILD_EXECUTABLE)
58
59# fxload
60
61include $(CLEAR_VARS)
62
63LOCAL_SRC_FILES := \
64  $(LIBUSB_ROOT_REL)/examples/ezusb.c \
65  $(LIBUSB_ROOT_REL)/examples/fxload.c
66
67LOCAL_C_INCLUDES += \
68  $(LOCAL_PATH)/.. \
69  $(LIBUSB_ROOT_ABS)
70
71LOCAL_SHARED_LIBRARIES += libusb1.0
72
73LOCAL_MODULE := fxload
74
75include $(BUILD_EXECUTABLE)
76
77# hotplugtest
78
79include $(CLEAR_VARS)
80
81LOCAL_SRC_FILES := \
82  $(LIBUSB_ROOT_REL)/examples/hotplugtest.c
83
84LOCAL_C_INCLUDES += \
85  $(LOCAL_PATH)/.. \
86  $(LIBUSB_ROOT_ABS)
87
88LOCAL_SHARED_LIBRARIES += libusb1.0
89
90LOCAL_MODULE := hotplugtest
91
92include $(BUILD_EXECUTABLE)
93
94# listdevs
95
96include $(CLEAR_VARS)
97
98LOCAL_SRC_FILES := \
99  $(LIBUSB_ROOT_REL)/examples/listdevs.c
100
101LOCAL_C_INCLUDES += \
102  $(LOCAL_PATH)/.. \
103  $(LIBUSB_ROOT_ABS)
104
105LOCAL_SHARED_LIBRARIES += libusb1.0
106
107LOCAL_MODULE := listdevs
108
109include $(BUILD_EXECUTABLE)
110
111# sam3u_benchmark
112
113include $(CLEAR_VARS)
114
115LOCAL_SRC_FILES := \
116  $(LIBUSB_ROOT_REL)/examples/sam3u_benchmark.c
117
118LOCAL_C_INCLUDES += \
119  $(LOCAL_PATH)/.. \
120  $(LIBUSB_ROOT_ABS)
121
122LOCAL_SHARED_LIBRARIES += libusb1.0
123
124LOCAL_MODULE := sam3u_benchmark
125
126include $(BUILD_EXECUTABLE)
127
128# xusb
129
130include $(CLEAR_VARS)
131
132LOCAL_SRC_FILES := \
133  $(LIBUSB_ROOT_REL)/examples/xusb.c
134
135LOCAL_C_INCLUDES += \
136  $(LOCAL_PATH)/.. \
137  $(LIBUSB_ROOT_ABS)
138
139LOCAL_SHARED_LIBRARIES += libusb1.0
140
141LOCAL_MODULE := xusb
142
143include $(BUILD_EXECUTABLE)
144