How to compile libusb as shared/static library
I am trying to build libusb as shared library as follows.
Following are two steps. 1. Configure 2. Make.
預設會生成靜態庫和動態在 /libusb/.lib/目錄下。
android ndk 編譯動態和靜態庫的方法
libusb.mk
# Android build config for libusb
# Copyright © 2012-2013 RealVNC Ltd. <toby.gray@realvnc.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
LOCAL_PATH:= $(call my-dir)
LIBUSB_ROOT_REL:= ../..
LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../..
# libusb
include $(CLEAR_VARS)
LIBUSB_ROOT_REL:= ../..
LIBUSB_ROOT_ABS:= $(LOCAL_PATH)/../..
LOCAL_SRC_FILES := \
$(LIBUSB_ROOT_REL)/libusb/core.c \
$(LIBUSB_ROOT_REL)/libusb/descriptor.c \
$(LIBUSB_ROOT_REL)/libusb/hotplug.c \
$(LIBUSB_ROOT_REL)/libusb/io.c \
$(LIBUSB_ROOT_REL)/libusb/sync.c \
$(LIBUSB_ROOT_REL)/libusb/strerror.c \
$(LIBUSB_ROOT_REL)/libusb/os/linux_usbfs.c \
$(LIBUSB_ROOT_REL)/libusb/os/poll_posix.c \
$(LIBUSB_ROOT_REL)/libusb/os/threads_posix.c \
$(LIBUSB_ROOT_REL)/libusb/os/linux_netlink.c
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/.. \
$(LIBUSB_ROOT_ABS)/libusb \
$(LIBUSB_ROOT_ABS)/libusb/os
LOCAL_EXPORT_C_INCLUDES := \
$(LIBUSB_ROOT_ABS)/libusb
#LOCAL_LDLIBS := -llog
LOCAL_MODULE := libusb1.0
#include $(BUILD_SHARED_LIBRARY)
include $(BUILD_STATIC_LIBRARY)
相關文章
- Swift工程如何整合Static LibrarySwift
- How to open and close static streams in a USB bulk endpoint
- [原創] How to pull code when shared repo commit history has been changedMIT
- [20190319]shared pool latch與library cache latch的簡單探究.txt
- [20210512]shared pool latch與library cache latch的簡單探究.txt
- build libusb for AndroidUIAndroid
- libusb:libusb_bulk_transfer的timeout引數問題
- Can't debug c++ project because unable to static library start program *.libC++Project
- Android原始碼編譯jar包BUILD_JAVA_LIBRARY 與BUILD_STATIC_JAVA_LIBRARY的區別(一)Android原始碼編譯JARUIJava
- [20210520]11g shared pool latch與library cache mutex的簡單探究.txtMutex
- libusb開發者指南
- [ERROR] mysqld: Can‘t open shared library ‘/usr/local/mysql/lib/plugin/validate_password.so‘ (errno:ErrorMySqlPlugin
- [20210521]11g shared pool latch與library cache mutex的簡單探究4.txtMutex
- [20210520]11g shared pool latch與library cache mutex的簡單探究3.txtMutex
- libusb android ndk編譯--編譯mipsAndroid編譯
- static
- How to ssh
- 解決Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile(default-compile)AIGoApacheMavenPluginCompile
- library cache pin和library cache lock(一)
- library cache pin和library cache lock (zt)
- library cache pin和library cache lock(二)
- static用法
- Tensorflow2的Keras介面:compile、fitKerasCompile
- boost library
- ORA-15180: could not open dynamic library ASM LibraryASM
- How to find dependency
- std::make_shared
- 共享池 shared pool
- java中的Static、final、Static final各種用法Java
- Library Cache最佳化篇(一)降低library cache lock和library cache pin的方法
- error while loading shared libraries: libgsl.so.27: cannot open shared objectErrorWhileObject
- Error while loading shared libraries: libreadline.so.7: cannot open shared objecErrorWhileOBJ
- library cache lock和library cache bin實驗_2.0
- The app.Configuration 'compile' is obsolete and has been replaced with 'implementation'APPCompile
- org.apache.jasper.JasperException: Unable to compile class for JSPApacheExceptionCompileJS
- 實現一個簡單的MVVM(Compile)MVVMCompile
- static的作用
- C#staticC#