Hamlib/tests/Makefile.am

122 wiersze
4.6 KiB
Makefile
Czysty Zwykły widok Historia

# Current Autotools documentation suggests that DejaGNU is obsolete
# and replaced by Autotest. TODO: implement Autotest
# AUTOMAKE_OPTIONS = dejagnu
# DEJATOOL = testfreq testbcd testloc rigctl
2020-05-23 15:58:25 +00:00
BUILT_SOURCES = hamlibdatetime.h
DISTCLEANFILES = rigctl.log rigctl.sum testbcd.log testbcd.sum hamlibdatetime.h
2019-06-12 20:52:35 +00:00
bin_PROGRAMS = rigctl rigctld rigmem rigsmtr rigswr rotctl rotctld rigctlcom ampctl ampctld
check_PROGRAMS = dumpmem testrig testtrn testbcd testfreq listrigs testloc rig_bench cachetest cachetest2
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
rigctl_SOURCES = rigctl.c $(RIGCOMMONSRC)
rigctld_SOURCES = rigctld.c $(RIGCOMMONSRC)
2019-01-14 15:36:35 +00:00
rigctlcom_SOURCES = rigctlcom.c $(RIGCOMMONSRC)
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)
rigswr_SOURCES = rigswr.c
rigsmtr_SOURCES = rigsmtr.c
rigmem_SOURCES = rigmem.c memsave.c memload.c memcsv.c sprintflst.c sprintflst.h
2020-10-17 02:18:30 +00:00
# include generated include files ahead of any in sources
rigctl_CPPFLAGS = -I$(top_builddir)/tests -I$(top_srcdir) $(AM_CPPFLAGS)
# all the programs need this
LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la $(DL_LIBS)
rigmem_CFLAGS = $(AM_CFLAGS) $(LIBXML2_CFLAGS)
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)
2020-01-21 17:58:25 +00:00
rigctl_LDADD = $(PTHREAD_LIBS) $(READLINE_LIBS) $(LDADD)
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)
rigmem_LDADD = $(LIBXML2_LIBS) $(LDADD)
2019-01-14 15:36:35 +00:00
rigctlcom_LDADD = $(NET_LIBS) $(PTHREAD_LIBS) $(LDADD) $(READLINE_LIBS)
# 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)
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)
if HTML_MATRIX
EXTRA_PROGRAMS = rigmatrix
# rigmatrix needs libgd
2013-09-08 13:56:28 +00:00
rigmatrix_LDFLAGS = -lgd -lz
rigmatrix.html: rigmatrix_head.html rigmatrix listrigs
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
./rigctl -l |sort -n | $(srcdir)/rig_split_lst.awk -v lst_dir="sup-info"
endif
EXTRA_DIST = rigmatrix_head.html rig_split_lst.awk testctld.pl testrotctld.pl \
hamlibdatetime.h.in
# Support 'make check' target for simple tests
check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh
TESTS = $(check_SCRIPTS)
testrig.sh:
echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./testrig 1' > testrig.sh
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
# 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
# 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)"
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 \
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) $@
2020-10-17 11:30:08 +00:00
FORCE:
CLEANFILES = testrig.sh testfreq.sh testbcd.sh testloc.sh