1 # Android build config for libusb examples
2 # Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
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.
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.
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
19 LOCAL_PATH := $(call my-dir)
20 LIBUSB_ROOT_REL := ../..
21 LIBUSB_ROOT_ABS := $(LOCAL_PATH)/../..
23 ifeq ($(USE_PC_NAME),1)
24 LIBUSB_MODULE := usb-1.0
26 LIBUSB_MODULE := libusb1.0
34 $(LIBUSB_ROOT_REL)/examples/dpfp.c
40 LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE)
44 include $(BUILD_EXECUTABLE)
51 $(LIBUSB_ROOT_REL)/examples/dpfp.c
57 LOCAL_CFLAGS := -DDPFP_THREADED -pthread
59 LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE)
61 LOCAL_MODULE := dpfp_threaded
63 include $(BUILD_EXECUTABLE)
70 $(LIBUSB_ROOT_REL)/examples/ezusb.c \
71 $(LIBUSB_ROOT_REL)/examples/fxload.c
77 LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE)
79 LOCAL_MODULE := fxload
81 include $(BUILD_EXECUTABLE)
88 $(LIBUSB_ROOT_REL)/examples/hotplugtest.c
94 LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE)
96 LOCAL_MODULE := hotplugtest
98 include $(BUILD_EXECUTABLE)
102 include $(CLEAR_VARS)
105 $(LIBUSB_ROOT_REL)/examples/listdevs.c
107 LOCAL_C_INCLUDES += \
111 LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE)
113 LOCAL_MODULE := listdevs
115 include $(BUILD_EXECUTABLE)
119 include $(CLEAR_VARS)
122 $(LIBUSB_ROOT_REL)/examples/sam3u_benchmark.c
124 LOCAL_C_INCLUDES += \
128 LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE)
130 LOCAL_MODULE := sam3u_benchmark
132 include $(BUILD_EXECUTABLE)
136 include $(CLEAR_VARS)
139 $(LIBUSB_ROOT_REL)/examples/xusb.c
141 LOCAL_C_INCLUDES += \
145 LOCAL_SHARED_LIBRARIES += $(LIBUSB_MODULE)
149 include $(BUILD_EXECUTABLE)