2012-01-12 21:34:38 +00:00
|
|
|
# Current Autotools documentation suggests that DejaGNU is obsolete
|
|
|
|
# and replaced by Autotest. TODO: implement Autotest
|
2001-07-21 13:02:31 +00:00
|
|
|
|
2012-01-12 21:34:38 +00:00
|
|
|
# AUTOMAKE_OPTIONS = dejagnu
|
|
|
|
# DEJATOOL = testfreq testbcd testloc rigctl
|
2002-09-06 14:07:17 +00:00
|
|
|
|
2020-05-23 15:58:25 +00:00
|
|
|
BUILT_SOURCES = hamlibdatetime.h
|
|
|
|
|
2020-05-27 12:04:36 +00:00
|
|
|
DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum hamlibdatetime.h
|
2002-09-06 14:07:17 +00:00
|
|
|
|
2019-06-12 20:52:35 +00:00
|
|
|
bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld
|
2012-10-18 02:06:03 +00:00
|
|
|
|
2020-05-01 21:28:48 +00:00
|
|
|
check_PROGRAMS = dumpmem testrig testtrn testbcd testfreq listrigs testloc rig_bench cachetest cachetest2
|
2002-09-06 14:07:17 +00:00
|
|
|
|
2020-05-27 12:04:36 +00:00
|
|
|
RIGCOMMONSRC = rigctl_parse.c rigctl_parse.h dumpcaps.c sprintflst.c sprintflst.h uthash.h hamlibdatetime.h
|
|
|
|
ROTCOMMONSRC = rotctl_parse.c rotctl_parse.h dumpcaps_rot.c uthash.h hamlibdatetime.h
|
|
|
|
AMPCOMMONSRC = ampctl_parse.c ampctl_parse.h dumpcaps_amp.c sprintflst.c sprintflst.h uthash.h hamlibdatetime.h
|
2013-12-11 02:14:22 +00:00
|
|
|
|
|
|
|
rigctl_SOURCES = rigctl.c $(RIGCOMMONSRC)
|
|
|
|
rigctld_SOURCES = rigctld.c $(RIGCOMMONSRC)
|
2019-01-14 15:36:35 +00:00
|
|
|
rigctlcom_SOURCES = rigctlcom.c $(RIGCOMMONSRC)
|
2013-12-11 02:14:22 +00:00
|
|
|
rotctl_SOURCES = rotctl.c $(ROTCOMMONSRC)
|
|
|
|
rotctld_SOURCES = rotctld.c $(ROTCOMMONSRC)
|
2019-06-12 20:52:35 +00:00
|
|
|
ampctl_SOURCES = ampctl.c $(AMPCOMMONSRC)
|
|
|
|
ampctld_SOURCES = ampctld.c $(AMPCOMMONSRC)
|
2004-06-14 20:13:35 +00:00
|
|
|
rigswr_SOURCES = rigswr.c
|
2007-05-21 20:03:17 +00:00
|
|
|
rigsmtr_SOURCES = rigsmtr.c
|
2013-12-11 02:14:22 +00:00
|
|
|
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c sprintflst.c sprintflst.h
|
2001-07-21 13:02:31 +00:00
|
|
|
|
2020-10-17 02:18:30 +00:00
|
|
|
# include generated include files ahead of any in sources
|
2020-10-17 00:45:15 +00:00
|
|
|
rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_srcdir) $(AM_CPPFLAGS)
|
2000-11-28 22:35:28 +00:00
|
|
|
|
|
|
|
# all the programs need this
|
2020-01-23 05:39:03 +00:00
|
|
|
LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS)
|
2000-11-28 22:35:28 +00:00
|
|
|
|
2013-12-11 02:14:22 +00:00
|
|
|
rigmem_CFLAGS = $(AM_CFLAGS) $(LIBXML2_CFLAGS)
|
2013-05-25 11:00:36 +00:00
|
|
|
rigctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
|
|
|
|
rotctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
|
2019-06-12 20:52:35 +00:00
|
|
|
ampctld_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
|
2019-01-14 15:36:35 +00:00
|
|
|
rigctlcom_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
|
2003-12-04 23:15:54 +00:00
|
|
|
|
2020-01-21 17:58:25 +00:00
|
|
|
rigctl_LDADD = $(PTHREAD_LIBS) $(READLINE_LIBS) $(LDADD)
|
2013-12-11 02:14:22 +00:00
|
|
|
rigctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
|
|
|
|
rotctl_LDADD = $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
|
|
|
|
rotctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
|
2019-06-12 20:52:35 +00:00
|
|
|
ampctl_LDADD = $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
|
|
|
|
ampctld_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
|
2013-12-11 02:14:22 +00:00
|
|
|
rigmem_LDADD = $(LIBXML2_LIBS) $(LDADD)
|
2019-01-14 15:36:35 +00:00
|
|
|
rigctlcom_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
|
2000-11-28 22:35:28 +00:00
|
|
|
|
2013-12-11 02:14:22 +00:00
|
|
|
# Linker options
|
|
|
|
rigctl_LDFLAGS = $(WINEXELDFLAGS)
|
|
|
|
rigswr_LDFLAGS = $(WINEXELDFLAGS)
|
|
|
|
rigsmtr_LDFLAGS = $(WINEXELDFLAGS)
|
|
|
|
rigmem_LDFLAGS = $(WINEXELDFLAGS)
|
|
|
|
rotctl_LDFLAGS = $(WINEXELDFLAGS)
|
2019-06-12 20:52:35 +00:00
|
|
|
ampctl_LDFLAGS = $(WINEXELDFLAGS)
|
2013-12-11 02:14:22 +00:00
|
|
|
rigctld_LDFLAGS = $(WINEXELDFLAGS)
|
|
|
|
rotctld_LDFLAGS = $(WINEXELDFLAGS)
|
2019-06-12 20:52:35 +00:00
|
|
|
ampctld_LDFLAGS = $(WINEXELDFLAGS)
|
2019-01-14 15:36:35 +00:00
|
|
|
rigctlcom_LDFLAGS = $(WINEXELDFLAGS)
|
2001-06-04 21:25:07 +00:00
|
|
|
|
2001-12-27 22:02:19 +00:00
|
|
|
|
2012-10-18 02:06:03 +00:00
|
|
|
if HTML_MATRIX
|
|
|
|
EXTRA_PROGRAMS = rigmatrix
|
|
|
|
# rigmatrix needs libgd
|
2013-09-08 13:56:28 +00:00
|
|
|
rigmatrix_LDFLAGS = -lgd -lz
|
2002-09-06 14:07:17 +00:00
|
|
|
rigmatrix.html: rigmatrix_head.html rigmatrix listrigs
|
2007-05-21 20:35:41 +00:00
|
|
|
mkdir -p sup-info/support
|
|
|
|
( cat $(srcdir)/rigmatrix_head.html && cd sup-info && ../rigmatrix ) > sup-info/rigmatrix.html
|
2020-05-31 02:41:58 +00:00
|
|
|
for f in $$(./listrigs | tail -n +2 | cut -f1) ; do ( ./rigctl -m $$f -u > sup-info/support/model$$f.txt || exit 0 ) ; done
|
2007-05-21 20:35:41 +00:00
|
|
|
./rigctl -l |sort -n | $(srcdir)/rig_split_lst.awk -v lst_dir="sup-info"
|
2012-10-18 02:06:03 +00:00
|
|
|
endif
|
|
|
|
|
2001-06-04 21:25:07 +00:00
|
|
|
|
2020-05-31 12:42:02 +00:00
|
|
|
EXTRA_DIST = rigmatrix_head.html rig_split_lst.awk testctld.pl testrotctld.pl \
|
|
|
|
hamlibdatetime.h.in
|
2001-06-15 07:06:11 +00:00
|
|
|
|
2012-01-12 21:34:38 +00:00
|
|
|
# Support 'make check' target for simple tests
|
|
|
|
check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh
|
|
|
|
|
|
|
|
TESTS = $(check_SCRIPTS)
|
|
|
|
|
|
|
|
|
|
|
|
testrig.sh:
|
2015-09-03 17:03:53 +00:00
|
|
|
echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./testrig 1' > testrig.sh
|
2012-01-12 21:34:38 +00:00
|
|
|
chmod +x ./testrig.sh
|
|
|
|
|
|
|
|
testfreq.sh:
|
|
|
|
echo './testfreq' > testfreq.sh
|
|
|
|
chmod +x ./testfreq.sh
|
|
|
|
|
|
|
|
testbcd.sh:
|
|
|
|
echo './testbcd 146520000 10' > testbcd.sh
|
|
|
|
chmod +x ./testbcd.sh
|
|
|
|
|
|
|
|
testloc.sh:
|
|
|
|
echo './testloc EM79UT96LW 5' > testloc.sh
|
|
|
|
chmod +x ./testloc.sh
|
|
|
|
|
2020-10-17 11:11:47 +00:00
|
|
|
# If we have a .git directory then we will generate the hamlibdate.h
|
2020-10-17 02:18:30 +00:00
|
|
|
# file. If not, then copy the placeholder. Either way copy the result
|
2020-10-17 11:11:47 +00:00
|
|
|
# to the sources directory if it is different for inclusion in
|
|
|
|
# distribution tarballs, which avoids race conditions with parallel
|
|
|
|
# builds.
|
2020-10-17 11:30:08 +00:00
|
|
|
hamlibdatetime.h: FORCE
|
2020-06-04 17:18:41 +00:00
|
|
|
echo "SHA=$(SHA)"
|
2020-10-17 11:11:47 +00:00
|
|
|
if test -x $(top_srcdir)/.git ; then \
|
2020-10-17 12:32:49 +00:00
|
|
|
echo "/* This date time is from the last non-merge commit to Hamlib. */" > $@.tmp ;\
|
|
|
|
echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%a %b %d %H:%M:%S %Y %z SHA=' --format='%cd' -n 1)$$(git --git-dir=$(top_srcdir)/.git log --no-merges | grep commit | head -n 1 | cut -c8-13)\" >> $@.tmp ;\
|
2020-10-17 12:35:16 +00:00
|
|
|
if $$(diff $@.tmp $@) ; then \
|
|
|
|
mv -f $@.tmp $@ ;\
|
2020-10-17 12:32:49 +00:00
|
|
|
cp -f $@ $(top_srcdir)/tests/$(@F) ;\
|
|
|
|
fi \
|
2020-10-17 11:11:47 +00:00
|
|
|
fi
|
|
|
|
test -f $(top_srcdir)/tests/$(@F) || cp $(top_srcdir)/tests/$(@F).in $(top_srcdir)/tests/$(@F)
|
2020-10-17 12:25:35 +00:00
|
|
|
test -f $@ || cp $(top_srcdir)/tests/$(@F) $@
|
2012-01-12 21:34:38 +00:00
|
|
|
|
2020-10-17 11:30:08 +00:00
|
|
|
FORCE:
|
|
|
|
|
2012-01-12 21:34:38 +00:00
|
|
|
CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh
|