-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add standalone libftdi1 library #20
base: master
Are you sure you want to change the base?
Conversation
# How to generate libftdi1-static.a Clone repositories `libusb` and `libconfuse-2.5` and compile them to get their static libraries # Configure libftdi as follows adding the correct path to each library static libraries and header folders cmake -B build -DLIBUSB_LIBRARIES=`pwd`/libusb-1.0.a \ -DLIBUSB_INCLUDE_DIR=`pwd`/libusb/libusb \ -DCONFUSE_LIBRARY=`pwd`/libconfuse.a \ -DCONFUSE_INCLUDE_DIR=`pwd`/confuse-2.5/src \ -DFTDIPP=ON \ -DCMAKE_BUILD_TYPE=Release # Compile the static library ```bash make -C build ftdi1-static ``` # 1. Use `ar -x libftdi1.a && ar -x libconfuse.a && ar -x libusb-1.0.a` to extract all object files # 2. Use `ar -qc libftdi1-static.a *.o` to create ftdi static library # 3. Copy the generated libftdi1-static.a to libmpsse src folder.
8f0af07
to
89cd97d
Compare
Sorry i didn't notice your PR. |
thanks, @l29ah and noted.
Do you have some feedback on the code changes itself? |
I prefer the build system to take the dependencies from the running system, as it does now. No, and i would prefer not to touch the formatting for some time to maintain compatibility with people's patches to the original libmpsse, even though the current style is horrible. |
And i probably can't even tell what "the code changes itself" are among the automatically generated stuff and questionable scripts. |
@l29ah thanks for the feedback and sorry for the trouble. |
Dear @l29ah thanks a lot for maintaining this library. Here's another big PR for usability:
I'm making an attempt to make the library more mainstream to use by adding a static build of libftdi1, libusb and libconfuse included as a whole archive to libmpsse (libmpsse-static.a). This means that the user only needs to link -lpthread and -ludev and should be ready to go.
I've updated the readme with the new build instruction, but you just have to run
build.sh
. Let me know your feedback.Here's the main changed I did to source code files:
libftdi
to allow ft2232h devices to be used with "0" ms latency timer.config.h
tompsse_config.h
. This avoids conflict with other projects which already uses config.h for something else.MISC
How to generate libftdi1-static.a
Clone repositories
libusb
andlibconfuse-2.5
and compile them to get their static libraries:Configure libftdi as follows adding the correct path to each library static libraries and header folders:
ar -x libftdi1.a && ar -x libconfuse.a && ar -x libusb.a
to extract all object filesar -qc libftdi1-static.a *.o
to create ftdi static library