2006-10-13 18:24:42 +00:00
## Process this file with automake to produce Makefile.in
2001-08-12 22:55:48 +00:00
2002-11-13 20:39:07 +00:00
aclocaldir = $( datadir) /aclocal
2001-08-12 22:55:48 +00:00
aclocal_DATA = hamlib.m4
2002-11-13 20:39:07 +00:00
pkgconfigdir = $( libdir) /pkgconfig
2002-10-07 21:40:34 +00:00
pkgconfig_DATA = hamlib.pc
2003-01-15 19:37:25 +00:00
EXTRA_DIST = PLAN TODO LICENSE hamlib.m4 hamlib.pc.in README.developer \
2011-06-21 03:26:27 +00:00
README.betatester README.win32 hamlib.spec
2001-08-12 22:55:48 +00:00
2007-11-01 01:13:30 +00:00
# BINDINGS_LIST subdirs are no longer built
2010-04-08 07:29:50 +00:00
SUBDIRS = macros include lib $( subdirs) src @BACKEND_LIST@ @ROT_BACKEND_LIST@ \
2002-10-07 21:40:34 +00:00
@BINDINGS@ tests doc
2001-01-03 23:10:15 +00:00
2007-11-01 01:13:30 +00:00
# tcl, perl, and kylix subdirs are no longer distributed
2010-03-01 18:43:38 +00:00
DIST_SUBDIRS = macros include lib $( subdirs) src c++ bindings tests doc \
2001-12-26 23:30:21 +00:00
icom kenwood aor yaesu dummy pcr alinco uniden tentec kachina jrc \
2009-01-24 13:33:49 +00:00
rpcrig winradio easycomm fodtrack rpcrot drake rotorez \
2010-10-26 20:47:35 +00:00
flexradio sartek lowe rft rs tapr kit skanti prm80 wj racal tuner \
2011-06-21 03:26:27 +00:00
gs232a heathkit spid ars m2 amsat scripts
2001-12-26 23:30:21 +00:00
2011-05-22 21:23:46 +00:00
rpm : Makefile dist
2003-01-12 17:02:07 +00:00
$( RPMBUILD) -ta $( PACKAGE) -$( VERSION) .tar.gz
rm $( PACKAGE) -$( VERSION) .tar.gz
2003-06-22 19:34:07 +00:00
ACLOCAL_AMFLAGS = -I macros
2011-05-22 21:23:46 +00:00
# Hack for generating the win32 binaries
.PHONY : dist -win 32
distdirw32 = " $( distdir) -win32 "
# FIXME: get libusb-win32 path from configure
libusb_win32_bin_path = $( top_builddir) /../libusb-win32-bin-1.2.4.0
msvc_toolkit_path = ~/.wine/drive_c/Program\ Files/Microsoft\ Visual\ C++\ Toolkit\ 2003
zipdir = hamlib-win32-$( VERSION)
# aka unix2dos
TODOS = todos
dist-win32 :
@# Import internal ./libltdl and build it for mingw32
mkdir -p $( distdirw32) /_build $( distdirw32) /_inst
@# Configure and build hamlib for mingw32, with libusb-win32
@# FIXME: Need to forge a file libusb.pc
$( am__cd) $( distdirw32) /_build \
&& ( test -d libltdl || ( libtoolize --ltdl && \
2011-06-14 21:36:07 +00:00
$( am__cd) libltdl && ./configure --disable-static --host= i586-mingw32msvc && make ) ) \
2011-05-22 21:23:46 +00:00
&& ../../$( top_srcdir) /configure --disable-static \
--host= i586-mingw32msvc \
--prefix= ` pwd ` /../_inst \
--without-rpc-backends \
2011-06-14 21:36:07 +00:00
--without-cxx-binding \
2011-05-22 21:23:46 +00:00
PKG_CONFIG_LIBDIR = ../../$( libusb_win32_bin_path) /lib/pkgconfig \
&& make $( AM_MAKEFLAGS) install
mkdir -p $( zipdir) /bin $( zipdir) /lib/msvc $( zipdir) /lib/gcc $( zipdir) /include
cp -a $( distdirw32) /_build/src/libhamlib.def $( zipdir) /lib/msvc/libhamlib-@ABI_VERSION@.def
cp -a $( distdirw32) /_inst/include/hamlib $( zipdir) /include/.
$( TODOS) $( zipdir) /lib/msvc/libhamlib-@ABI_VERSION@.def $( zipdir) /include/hamlib/*.h
2011-06-14 21:36:07 +00:00
@# C++ binding is pointless on win32 because of its ABI
2011-05-22 21:23:46 +00:00
rm -f $( zipdir) /include/hamlib/{ rig,rot} class.h
for f in README README.betatester LICENSE COPYING.LIB README_VB ; do \
cp -a $( top_srcdir) /$$ { f} $( zipdir) /$$ { f} .txt && $( TODOS) $( zipdir) /$$ { f} .txt ; done
cp -a $( distdirw32) /_inst/bin/{ libhamlib-@ABI_VERSION@.dll,rigctld.exe,rigctl.exe,rigmem.exe,rigsmtr.exe,rigswr.exe,rotctld.exe,rotctl.exe} $( zipdir) /bin/.
cp -a $( distdirw32) /_inst/lib/hamlib/hamlib-*.dll $( zipdir) /bin/.
cp -a $( distdirw32) /_inst/lib/libhamlib.dll.a $( zipdir) /lib/gcc
@# NB: Do no strip libusb0.dll
i586-mingw32msvc-strip $( zipdir) /bin/*.exe $( zipdir) /bin/*hamlib-*.dll
cp -a ${ libusb_win32_bin_path } /bin/x86/libusb0_x86.dll $( zipdir) /bin/libusb0.dll
@# Need VC++ free toolkit installed somewhere ( TODO: or dlltool is enough?)
$( am__cd) $( zipdir) /lib/msvc/ && \
wine $( msvc_toolkit_path) /bin/link.exe /lib /machine:i386 /def:libhamlib-@ABI_VERSION@.def || true
zip -r hamlib-win32-$( VERSION) .zip $( zipdir)
rm -rf $( distdirw32)