2002-09-08 22:31:01 +00:00
|
|
|
|
2003-04-06 18:43:48 +00:00
|
|
|
# Hamlib bindings using SWIG
|
2002-10-07 21:44:51 +00:00
|
|
|
# more information on swig at http://www.swig.org
|
2003-04-06 18:43:48 +00:00
|
|
|
#
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2003-04-23 22:17:19 +00:00
|
|
|
#INCLUDES = @INCLUDES@ -Dbool=char -I@PERL_INC_DIR@ @TCL_INCLUDE_SPEC@ -I$(top_srcdir)/bindings
|
2003-08-25 22:26:08 +00:00
|
|
|
INCLUDES = @INCLUDES@ -I$(top_srcdir)/bindings @TCL_INCLUDE_SPEC@ @PYTHON_CPPFLAGS@
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2008-05-04 21:36:33 +00:00
|
|
|
SWGFILES = hamlib.swg ignore.swg rig.swg rotator.swg
|
|
|
|
|
2003-06-22 19:54:06 +00:00
|
|
|
SWGDEP=$(top_srcdir)/include/hamlib/rig.h $(top_srcdir)/include/hamlib/riglist.h \
|
2008-05-04 21:36:33 +00:00
|
|
|
$(top_srcdir)/include/hamlib/rotator.h $(top_srcdir)/include/hamlib/rotlist.h \
|
|
|
|
$(SWGFILES)
|
2003-06-22 19:54:06 +00:00
|
|
|
|
2008-06-26 15:23:06 +00:00
|
|
|
AM_CFLAGS = -fno-strict-aliasing
|
2003-04-06 18:43:48 +00:00
|
|
|
##########################################
|
2002-09-08 22:31:01 +00:00
|
|
|
# Perl binding
|
|
|
|
|
2003-06-22 19:54:06 +00:00
|
|
|
hamlibperl_wrap.c: hamlib.swg $(SWIGDEP)
|
2003-04-06 18:43:48 +00:00
|
|
|
$(SWIG) -perl5 -shadow @INCLUDES@ -I$(top_srcdir)/bindings -o $@ \
|
|
|
|
`test -f hamlib.swg || echo '$(srcdir)/'`hamlib.swg
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2003-04-23 22:17:19 +00:00
|
|
|
Hamlib-pl.mk: $(srcdir)/Makefile.PL
|
|
|
|
test -f Makefile.PL || $(LN_S) $(srcdir)/Makefile.PL Makefile.PL
|
|
|
|
perl `test -f Makefile.PL || echo '$(srcdir)/'`Makefile.PL \
|
2006-11-07 04:28:26 +00:00
|
|
|
MAKEFILE="Hamlib-pl.mk" \
|
2004-02-08 17:52:59 +00:00
|
|
|
PREFIX="$(prefix)" \
|
2003-04-06 18:43:48 +00:00
|
|
|
INC="$(INCLUDES)" \
|
2003-11-16 22:09:38 +00:00
|
|
|
CC="$(CC)" \
|
2006-11-07 04:28:26 +00:00
|
|
|
OBJECT="hamlibperl_wrap.o" \
|
|
|
|
VERSION="$(PACKAGE_VERSION)" \
|
2008-05-17 16:36:54 +00:00
|
|
|
LIBS="-L$(top_builddir)/src/.libs -lhamlib"
|
|
|
|
sed -e 's/^LD_RUN_PATH.*/LD_RUN_PATH =/' Hamlib-pl.mk > Hamlib-pl-norpath.mk
|
|
|
|
mv Hamlib-pl-norpath.mk Hamlib-pl.mk
|
2002-10-31 00:47:31 +00:00
|
|
|
|
2003-04-06 18:43:48 +00:00
|
|
|
all-perl: Hamlib-pl.mk hamlibperl_wrap.c
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk all
|
|
|
|
|
|
|
|
check-perl: all-perl
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk test
|
|
|
|
|
|
|
|
clean-perl: Hamlib-pl.mk
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk clean
|
|
|
|
|
2006-11-07 04:28:26 +00:00
|
|
|
distclean-perl: ## Hamlib-pl.mk
|
|
|
|
## $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk distclean
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2003-04-06 18:43:48 +00:00
|
|
|
distcheck-perl: Hamlib-pl.mk
|
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk distcheck
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2003-04-06 18:43:48 +00:00
|
|
|
install-perl: Hamlib-pl.mk
|
2006-11-09 04:32:35 +00:00
|
|
|
$(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk install_site
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2006-11-09 04:32:35 +00:00
|
|
|
## ExtUtils::MakeMaker says uninstall is deprecated and won't remove the files
|
|
|
|
## anyway, so we'll have to figure out another way to remove the installed files.
|
|
|
|
uninstall-perl: ## Hamlib-pl.mk
|
|
|
|
## $(MAKE) $(AM_MAKEFLAGS) -f Hamlib-pl.mk uninstall
|
2004-02-08 17:52:59 +00:00
|
|
|
|
2003-04-06 18:43:48 +00:00
|
|
|
|
|
|
|
##########################################
|
2002-09-08 22:31:01 +00:00
|
|
|
# Tcl binding
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2003-08-25 22:26:08 +00:00
|
|
|
tcl_ltlib = hamlibtcl.la
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
tcldir = $(prefix)/lib/tcl
|
|
|
|
|
2003-04-23 22:17:19 +00:00
|
|
|
PKG_VER=1.0
|
|
|
|
DLL=hamlibtcl-$(PKG_VER)@TCL_SHLIB_SUFFIX@
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2002-10-31 00:47:31 +00:00
|
|
|
nodist_hamlibtcl_la_SOURCES = hamlibtcl_wrap.c
|
2003-04-23 22:17:19 +00:00
|
|
|
hamlibtcl_la_LDFLAGS = -no-undefined -module -release $(PKG_VER) -avoid-version @TCL_LIB_SPEC@
|
2002-11-13 20:39:07 +00:00
|
|
|
hamlibtcl_la_LIBADD = $(top_builddir)/src/libhamlib.la
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
hamlibtcl_ladir = $(tcldir)
|
|
|
|
hamlibtcl_la_DATA = pkgIndex.tcl
|
|
|
|
|
2003-04-23 22:17:19 +00:00
|
|
|
pkgIndex.tcl: Makefile
|
2003-04-06 18:43:48 +00:00
|
|
|
echo 'package ifneeded Hamlib $(PKG_VER) [list load [file join $$dir $(DLL)] Hamlib]' > pkgIndex.tcl
|
|
|
|
|
2003-06-22 19:54:06 +00:00
|
|
|
hamlibtcl_wrap.c: hamlib.swg $(SWGDEP)
|
2003-04-23 22:17:19 +00:00
|
|
|
$(SWIG) -tcl -pkgversion $(PKG_VER) @INCLUDES@ -I$(top_srcdir)/bindings -o $@ \
|
|
|
|
`test -f hamlib.swg || echo '$(srcdir)/'`hamlib.swg
|
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
all-tcl: pkgIndex.tcl $(tcl_ltlib)
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2003-04-23 22:17:19 +00:00
|
|
|
check-tcl: all-tcl
|
|
|
|
TCLLIBPATH=$(builddir)/.libs $(srcdir)/tcltest.tcl || echo "Tcl test failed" 1>&2
|
|
|
|
|
2008-05-04 21:36:33 +00:00
|
|
|
install-tcl:
|
2003-04-06 18:43:48 +00:00
|
|
|
clean-tcl:
|
|
|
|
distclean-tcl: clean-tcl
|
2004-02-08 17:52:59 +00:00
|
|
|
uninstall-tcl:
|
2003-04-06 18:43:48 +00:00
|
|
|
|
|
|
|
##########################################
|
2003-08-25 22:26:08 +00:00
|
|
|
# Python binding
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2003-08-25 22:26:08 +00:00
|
|
|
python_ltlib = _Hamlib.la
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
pythondir = $(prefix)/lib/python
|
|
|
|
|
2003-08-25 22:26:08 +00:00
|
|
|
nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c
|
2007-11-27 19:55:19 +00:00
|
|
|
_Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version
|
2003-08-25 22:26:08 +00:00
|
|
|
_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la
|
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
_Hamlib_ladir = $(pythondir)
|
|
|
|
|
|
|
|
Hamlib.py: hamlibpy_wrap.c
|
2003-08-25 22:26:08 +00:00
|
|
|
hamlibpy_wrap.c: hamlib.swg $(SWGDEP)
|
|
|
|
$(SWIG) -python @INCLUDES@ -I$(top_srcdir)/bindings -o $@ \
|
|
|
|
`test -f hamlib.swg || echo '$(srcdir)/'`hamlib.swg
|
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
all-py: $(python_ltlib)
|
2003-08-25 22:26:08 +00:00
|
|
|
|
|
|
|
check-py: all-py
|
2004-02-08 17:52:59 +00:00
|
|
|
$(srcdir)/pytest.py || echo "Python test failed" 1>&2
|
2003-08-25 22:26:08 +00:00
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
python_PYTHON = Hamlib.py
|
2003-08-25 22:26:08 +00:00
|
|
|
|
2004-02-08 17:52:59 +00:00
|
|
|
install-py:
|
|
|
|
clean-py:
|
|
|
|
distclean-py:
|
|
|
|
uninstall-py:
|
2003-08-25 22:26:08 +00:00
|
|
|
|
|
|
|
##########################################
|
|
|
|
|
2007-01-27 02:14:00 +00:00
|
|
|
lib_LTLIBRARIES = $(tcl_ltlib) $(python_ltlib)
|
|
|
|
# lib_LTLIBRARIES = @BINDING_LIB_TARGETS@
|
2003-08-25 22:26:08 +00:00
|
|
|
|
2005-04-03 17:06:37 +00:00
|
|
|
all-local: @BINDING_ALL@
|
|
|
|
|
|
|
|
check-local: @BINDING_CHECK@
|
|
|
|
clean-local: @BINDING_CLEAN@
|
|
|
|
distclean-local: @BINDING_DISTCLEAN@
|
|
|
|
distcheck-local: @BINDING_DISTCHECK@
|
|
|
|
install-exec-local: @BINDING_INSTALL_EXEC@
|
|
|
|
uninstall-local: @BINDING_UNINSTALL@
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2008-05-04 21:36:33 +00:00
|
|
|
EXTRA_DIST = $(SWGFILES) \
|
2003-08-25 22:26:08 +00:00
|
|
|
Makefile.PL perltest.pl tcltest.tcl pytest.py
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2003-08-25 22:26:08 +00:00
|
|
|
BUILT_SOURCES = hamlibperl_wrap.c hamlibtcl_wrap.c hamlibpy_wrap.c Hamlib.py
|
2003-04-06 18:43:48 +00:00
|
|
|
|
2006-11-07 04:28:26 +00:00
|
|
|
## DISTCLEANFILES = Hamlib-pl.mk Hamlib-pl.mk.old
|
|
|
|
DISTCLEANFILES = Hamlib-pl.mk.old
|
2002-09-08 22:31:01 +00:00
|
|
|
|
2003-08-25 22:26:08 +00:00
|
|
|
MOSTLYCLEANFILES = hamlibperl_wrap.c Hamlib.pm Hamlib.bs \
|
|
|
|
hamlibtcl_wrap.c pkgIndex.tcl \
|
|
|
|
hamlibpy_wrap.c Hamlib.py *.pyc
|
2002-10-07 21:44:51 +00:00
|
|
|
|
2004-08-01 21:18:23 +00:00
|
|
|
noinst_SCRIPTS = perltest.pl tcltest.tcl pytest.py hamlibvb.bas
|