kopia lustrzana https://github.com/Hamlib/Hamlib
113 wiersze
3.8 KiB
Plaintext
113 wiersze
3.8 KiB
Plaintext
|
||
This file is a HOWTO for the cross-compiling of Win32 binary DLLs built from
|
||
a tarball generated by 'make dist' in a Git checkout. The resulting DLLs
|
||
are built with a cdecl interface compatible with MS VC++.
|
||
|
||
|
||
Prerequisites
|
||
=============
|
||
|
||
In these steps the release or daily snapshot tarball is unpacked in ~/builds
|
||
for the Win32 build and all operations are done from there unless otherwise
|
||
noted.
|
||
|
||
Under Linux you need the mingw32 package to cross-compile it, zip to create
|
||
the archive, the tofrodos or dos2unix package installed to convert to DOS
|
||
text format, and Wine plus the free MVC++Toolkit available from:
|
||
|
||
http://uploading.com/files/HNH73WB3/VCToolkitSetup%28v1.01%29%282004.07.06%29.zip.html
|
||
|
||
to create the Win32 .LIB file (unzip and then install it with Wine in the
|
||
usual way).
|
||
|
||
NB: Debian Squeeze and later users will need at least the mingw32-runtime
|
||
3.15 package as the 3.13 package is broken. You can manually install the
|
||
Ubuntu version from:
|
||
|
||
http://packages.ubuntu.com/maverick/devel/mingw32-runtime
|
||
|
||
Finally, the Win32 version of libusb must be available for the USB backends to
|
||
be built. Download the latest libusb-win32-bin-1.2.4.0.zip from:
|
||
|
||
https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.4.0/
|
||
|
||
and unzip the archive in ~/builds/libusb-win32-bin-1.2.4.0 and then copy the
|
||
following into libusb-win32-bin-1.2.4.0/lib/pkgconfig/libusb.pc (the
|
||
pkgconfig directory will need to be created):
|
||
|
||
---------------CUT-----------------------------
|
||
prefix=/home/USER/builds/libusb-win32-bin-1.2.4.0
|
||
exec_prefix=${prefix}
|
||
libdir=${exec_prefix}/lib/gcc
|
||
bindir=${exec_prefix}/bin
|
||
includedir=${prefix}/include
|
||
|
||
Name: libusb
|
||
Description: USB access library
|
||
Version: 1.2.4.0
|
||
Libs: -L${libdir} -L${bindir} -lusb
|
||
Cflags: -I${includedir}
|
||
---------------CUT-----------------------------
|
||
|
||
Any version of libusb from 1.2.3.0 is known to work.
|
||
|
||
The script generates PDF documents for the included .EXE files using the
|
||
groff and ps2pdf utilities to convert the nroff formatted man pages. On
|
||
Debian and derivatives, installing the groff and ghostscript packages will
|
||
provide them.
|
||
|
||
|
||
Build for Win32, cross-compile on Linux:
|
||
========================================
|
||
|
||
Extract the Hamlib tarball into ~/builds (if you prefer another directory
|
||
be sure to edit the BUILD_DIR variable in the build-win32.sh script):
|
||
|
||
$ tar xvfz ~/Downloads/hamlib-3.0~git-???????-20121007.tar.gz
|
||
|
||
Invoke the build-win32.sh script (it requires a Bash shell) with the name of
|
||
the directory/Hamlib version to build (you need not cd into the hamlib
|
||
directory, although it won't hurt. The build-win32 script uses absolute
|
||
paths):
|
||
|
||
$ build-win32.sh hamlib-3.0~git
|
||
|
||
Note: As of 7 Oct 2012 the build should be independent of installed libtool
|
||
versions as libltdl is included in the source tarball (enabled with the
|
||
‘--with-included-ltdl’ option to the configure script (which this script
|
||
passes to configure)). The note below should now be obsolete.
|
||
|
||
Note: At this time (18 Jun 2011) the build will fail on Debian Unstable due
|
||
to a libtool version mismatch between libtool 2.2.6b included in the
|
||
mingw32/gcc-mingw32 packages and the later libtool 2.4 installed on Unstable
|
||
and Testing. Users of Debian Stable (Squeeze) and Ubuntu 10.10 (Maverick)
|
||
should be able to build the Win32 DLLs.
|
||
|
||
|
||
Release Info
|
||
============
|
||
|
||
The structure of the archive is:
|
||
|
||
$ tree -d
|
||
.
|
||
|-- bin
|
||
|-- include
|
||
| `-- hamlib
|
||
|-- lib
|
||
| |-- gcc
|
||
| `-- msvc
|
||
`-- pdf
|
||
|
||
7 directories
|
||
|
||
The bin directory is were the executables and DLL files are placed. Header
|
||
files are under include/Hamlib and compiler specific files are under lib/*.
|
||
PDF documents for the .EXE programs are in pdf/ while text documents
|
||
(READMEs and such) are in the main archive directory. The embedded
|
||
README.win32-bin file generated by the build-win32.sh script describes
|
||
setting the PATH environment variable in Windows 2000 and Windows XP.
|
||
|
||
|
||
73, Nate, N0NB
|