Update from Mark, plus some notes of mine

git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1813 7ae35d74-ebe9-4afe-98af-79ac388436b8
Hamlib-1.2.2
Stéphane Fillod, F8CFE 2004-08-17 20:49:21 +00:00
rodzic 618aa09eae
commit 08c127c240
1 zmienionych plików z 35 dodań i 50 usunięć

Wyświetl plik

@ -3,7 +3,7 @@ From: "Mark J. Fine" <fineware@starpower.net>
Subject: [Hamlib-developer] Building under Cygwin for Windows (Mingw32) Subject: [Hamlib-developer] Building under Cygwin for Windows (Mingw32)
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=hamlib-developer> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=hamlib-developer>
Date: Sun, 20 Jun 2004 15:25:24 -0400 Date: Sun, 20 Jun 2004 15:25:24 -0400
<revised by mjf 10 August, 2004>
Found this to be helpful for building hamlib under Cygwin/Mingw32 for Found this to be helpful for building hamlib under Cygwin/Mingw32 for
@ -12,15 +12,6 @@ linking with Windows apps:
1. To create the dlls, do the following from within Cygwin (assumes 1. To create the dlls, do the following from within Cygwin (assumes
Cygwin is fully updated): Cygwin is fully updated):
Modify include/hamlib/rig.h to put the include for sys/time.h in the
windows build, i.e.:
#if defined(__CYGWIN__) || defined(_WIN32)
#include <windows.h> /* HANDLE definition */
#include <sys/time.h> /* required for struct timeval */
#else
#include <sys/time.h> /* required for struct timeval */
#endif
Modify ./configure.ac to put all of the AC_CONFIG_FILES parameters all Modify ./configure.ac to put all of the AC_CONFIG_FILES parameters all
on one line, i.e.: on one line, i.e.:
AC_CONFIG_FILES([Makefile macros/Makefile include/Makefile AC_CONFIG_FILES([Makefile macros/Makefile include/Makefile
@ -30,43 +21,33 @@ uniden/Makefile tentec/Makefile kachina/Makefile jrc/Makefile
drake/Makefile lowe/Makefile rft/Makefile kit/Makefile tapr/Makefile drake/Makefile lowe/Makefile rft/Makefile kit/Makefile tapr/Makefile
gnuradio/Makefile easycomm/Makefile fodtrack/Makefile sartek/Makefile gnuradio/Makefile easycomm/Makefile fodtrack/Makefile sartek/Makefile
rpcrig/Makefile rpcrot/Makefile src/Makefile c++/Makefile rpcrig/Makefile rpcrot/Makefile src/Makefile c++/Makefile
bindings/Makefile tests/Makefile doc/Makefile rotorez/Makefile bindings/Makefile bindings/hamlibvb.bas tests/Makefile doc/Makefile
microtune/Makefile flexradio/Makefile hamlib.pc hamlib.spec]) doc/hamlib.cfg rotorez/Makefile microtune/Makefile flexradio/Makefile
hamlib.pc hamlib.spec])
For some reason Cygwin doesn't like it. For some reason Cygwin doesn't like it.
# export CC="gcc -mno-cygwin" # export CC="gcc -mno-cygwin"
# export CXX="g++ -mno-cygwin" # export CXX="g++ -mno-cygwin"
# ./autogen.sh --prefix=/usr/local --disable-static --disable-xmltest # ./autogen.sh --prefix=/usr/local --disable-static \
--without-rpc-backends --without-tcl-binding --without-perl-binding --without-rpc-backends --without-tcl-binding --without-perl-binding \
--without-python-binding --build=i686-pc-cygwin --host=i686-pc-mingw32 --without-python-binding --build=i686-pc-cygwin --host=i686-pc-mingw32 \
--target=i686-pc-mingw32 --target=i686-pc-mingw32
Note: on subsequent runs you can replace ./autogen.sh with ./configure Note: on subsequent runs you can replace ./autogen.sh with ./configure
unless there are modifications to any .ac, .m4, or Makefile.am file.
Modify include/config.h to put the sleep back in, i.e.: In that case, "make clean", and re-run autogen as above.
/* Define to 1 if you have win32 Sleep */
/* #undef HAVE_SSLEEP */
#define HAVE_SSLEEP 1
#define HAVE_SLEEP 1
For some reason ./configure doesn't properly recognize it.
Copy /usr/include/iconv.h into /usr/include/mingw/ otherwise rigmem
won't build.
# make # make
Don't run "make install" if you've already made a native Cygwin version Don't run "make install" if you've already made a native Cygwin version
of hamlib, since it will screw up the pkgconfig for Cygwin linking. of hamlib, since it will screw up the pkgconfig for Cygwin linking. In
Instead, manually go through all of the .libs and copy the resulting fact, it's best to have one tree for native Cygwin and another tree for
.exes and .dlls in to a single directory, or create a script to do it cross-compiling so you can avoid overwriting any created object files or
for you. libraries.
Also, copy the files in include/hamlib into this directory, but unmodify Instead of "make install", manually go through all of the .libs and copy
rig.h from before, i.e: the resulting .exes and .dlls in to a single directory, or create a script
#if defined(__CYGWIN__) || defined(_WIN32) to do it for you. Likewise, copy the .h files in include/hamlib into this
#include <windows.h> /* HANDLE definition */ same directory.
#else
#include <sys/time.h> /* required for struct timeval */
#endif
Go to the directory you've just put all that stuff in and run: Go to the directory you've just put all that stuff in and run:
# strip *.dll # strip *.dll
@ -80,9 +61,13 @@ Windows command window from the directory where you put all that stuff:
This will create libhamlib.lib and libhamlib.exp. This will create libhamlib.lib and libhamlib.exp.
REM: Using the (free) Microsoft Visual C++ Toolkit 2003, replace
the "lib" command by "link /lib".
libhamlib.lib and the .h includes from include/hamlib can now be used libhamlib.lib and the .h includes from include/hamlib can now be used
within any MSVC build (i.e., dream), but all the dlls must be put in the within any MSVC build (i.e., dream), but all the dlls must be put in the
same directory as the resulting .exe otherwise it won't find it. same directory or in PATH as the resulting .exe otherwise it won't find it.
-- --