version 1.1.1.1, 2013/07/21 23:43:42
|
version 1.1.1.3, 2021/03/17 00:07:30
|
Line 1
|
Line 1
|
SUBDIRS = img | EXTRA_DIST = \ |
| BSDCOPYING \ |
| SECURITY \ |
| build-aux/mtr.bat \ |
| img/mtr_icon.xpm |
| $(TEST_FILES) |
|
|
sbin_PROGRAMS = mtr | sbin_PROGRAMS = mtr mtr-packet |
man_MANS = mtr.8 | TESTS = \ |
| test/cmdparse.py \ |
| test/param.py \ |
| test/probe.py |
| |
| TEST_FILES = \ |
| test/cmdparse.py \ |
| test/mtrpacket.py \ |
| test/param.py \ |
| test/probe.py \ |
| test/lint.sh |
| EXTRA_DIST += $(TEST_FILES) |
| |
| PATHFILES = |
| CLEANFILES = $(PATHFILES) |
| EXTRA_DIST += $(PATHFILES:=.in) |
| |
| # |
| # We would use % pattern matching here, but that is a GNU make |
| # extension and doesn't work on FreeBSD. |
| # |
| mtr-packet.8: $(srcdir)/man/mtr-packet.8.in |
| $(AM_V_GEN) $(srcdir)/build-aux/mangen.sh "$(VERSION)" \ |
| $(srcdir)/man/mtr-packet.8.in $@ |
| |
| mtr.8: $(srcdir)/man/mtr.8.in |
| $(AM_V_GEN) $(srcdir)/build-aux/mangen.sh "$(VERSION)" \ |
| $(srcdir)/man/mtr.8.in $@ |
| |
| $(PATHFILES): Makefile |
| |
| dist_man_MANS = mtr.8 mtr-packet.8 |
| PATHFILES += man/mtr.8 man/mtr-packet.8 |
| |
install-exec-hook: |
install-exec-hook: |
chmod u+s $(DESTDIR)$(sbindir)/mtr | `setcap cap_net_raw+ep $(DESTDIR)$(sbindir)/mtr-packet` \ |
| || chmod u+s $(DESTDIR)$(sbindir)/mtr-packet |
|
|
mtr_SOURCES = mtr.c \ | mtr_SOURCES = ui/mtr.c ui/mtr.h \ |
net.c net.h \ | ui/net.c ui/net.h \ |
dns.c dns.h \ | ui/cmdpipe.c ui/cmdpipe.h \ |
raw.c raw.h \ | ui/dns.c ui/dns.h \ |
split.c split.h \ | ui/raw.c ui/raw.h \ |
display.c display.h \ | ui/split.c ui/split.h \ |
report.c report.h \ | ui/display.c ui/display.h \ |
getopt.c getopt1.c getopt.h \ | ui/report.c ui/report.h \ |
select.c select.h \ | ui/select.c ui/select.h \ |
mtr-curses.h \ | ui/utils.c ui/utils.h \ |
mtr-gtk.h | packet/cmdparse.c packet/cmdparse.h \ |
| packet/sockaddr.c packet/sockaddr.h \ |
| ui/mtr-curses.h \ |
| img/mtr_icon.xpm \ |
| ui/mtr-gtk.h |
|
|
if IPINFO | if WITH_ERROR |
mtr_SOURCES += asn.c asn.h | mtr_SOURCES += \ |
| portability/error.h \ |
| portability/error.c |
endif |
endif |
|
|
nodist_mtr_SOURCES = version.h | if WITH_GETOPT |
EXTRA_mtr_SOURCES = curses.c \ | mtr_SOURCES += \ |
gtk.c | portability/getopt.h \ |
DEFAULT_INCLUDES= $(GLIB_CFLAGS) -I. | portability/getopt.c \ |
mtr_DEPENDENCIES = $(GTK_OBJ) $(CURSES_OBJ) | portability/getopt1.c |
mtr_LDFLAGS = $(GTK_OBJ) $(CURSES_OBJ) | endif |
mtr_LDADD = $(GLIB_LIBS) $(RESOLV_LIBS) | |
|
|
CLEANFILES = version.h | if WITH_IPINFO |
BUILT_SOURCES = version.h | mtr_SOURCES += ui/asn.c ui/asn.h |
| endif |
|
|
version.h: version.h.tmp Makefile $(mtr_SOURCES) | if WITH_CURSES |
@cat version.h.tmp > $@; \ | mtr_SOURCES += ui/curses.c |
if [ -d .git ] && [ -n "$$(which git)" ]; then \ | endif |
xver="+git:$$(git rev-list -n1 --abbrev=8 --abbrev-commit HEAD)"; \ | |
sed \ | |
-e "/#define *MTR_VERSION */{s/\"\([^\"]*\)\"/\"\1$$xver\"/;}" \ | |
version.h.tmp > $@; \ | |
fi; | |
|
|
EXTRA_DIST = SECURITY mtr.8 Makefile Makefile.dist | if WITH_GTK |
distclean-local: | mtr_SOURCES += ui/gtk.c |
(sleep 3; cp Makefile.dist Makefile) & | endif |
rm -f *.orig | |
|
|
DISTCLEANFILES = *~ | if WITH_LIBASAN |
| ASAN_CFLAGS = -fno-omit-frame-pointer |
| ASAN_CFLAGS += -fsanitize=undefined |
| ASAN_CFLAGS += -fsanitize=address |
| endif |
| |
| mtr_INCLUDES = $(GLIB_CFLAGS) -I$(top_builddir) -I$(top_srcdir) |
| mtr_CFLAGS = $(GTK_CFLAGS) $(NCURSES_CFLAGS) $(ASAN_CFLAGS) $(JANSSON_CFLAGS) |
| mtr_LDADD = $(GTK_LIBS) $(NCURSES_LIBS) $(RESOLV_LIBS) $(JANSSON_LIBS) |
| |
| |
| mtr_packet_SOURCES = \ |
| portability/queue.h \ |
| packet/packet.c \ |
| packet/cmdparse.c packet/cmdparse.h \ |
| packet/command.c packet/command.h \ |
| packet/platform.h \ |
| packet/probe.c packet/probe.h \ |
| packet/protocols.h \ |
| packet/timeval.c packet/timeval.h \ |
| packet/wait.h \ |
| packet/sockaddr.c packet/sockaddr.h |
| |
| mtr_packet_LDADD = $(CAP_LIBS) |
| |
| |
| if WITH_ERROR |
| mtr_packet_SOURCES += \ |
| portability/error.h \ |
| portability/error.c |
| endif |
| |
| |
| if CYGWIN |
| |
| mtr_packet_SOURCES += \ |
| packet/probe_cygwin.c packet/probe_cygwin.h \ |
| packet/wait_cygwin.c |
| mtr_packet_LDADD += -lcygwin -liphlpapi -lws2_32 |
| |
| dist_windows_aux = \ |
| $(srcdir)/build-aux/mtr.bat \ |
| $(srcdir)/AUTHORS \ |
| $(srcdir)/BSDCOPYING \ |
| $(srcdir)/COPYING \ |
| $(srcdir)/README \ |
| $(srcdir)/NEWS |
| |
| distwindir = $(distdir)-win-$(host_cpu) |
| |
| # Bundle necessary files for a Windows binary distribution |
| distdir-win: $(dist_windows_aux) mtr.exe mtr-packet.exe |
| rm -fr $(distwindir) |
| mkdir -p $(distwindir) $(distwindir)/bin $(distwindir)/terminfo |
| cp $(dist_windows_aux) -t $(distwindir) |
| cp mtr.exe mtr-packet.exe -t $(distwindir)/bin |
| ldd mtr.exe | grep -v cygdrive | awk '{ print $$3 }' | xargs cp -t $(distwindir)/bin |
| cp `find /usr/share/terminfo -name cygwin | xargs dirname` -r $(distwindir)/terminfo |
| |
| # Zip up a Windows binary distribution |
| dist-windows-bin: distdir-win |
| rm -f $(distwindir).zip |
| zip -rq $(distwindir).zip $(distwindir) |
| rm -fr $(distwindir) |
| |
| else # if CYGWIN |
| |
| check_PROGRAMS = mtr-packet-listen |
| |
| mtr_packet_SOURCES += \ |
| packet/construct_unix.c packet/construct_unix.h \ |
| packet/deconstruct_unix.c packet/deconstruct_unix.h \ |
| packet/probe_unix.c packet/probe_unix.h \ |
| packet/wait_unix.c |
| |
| mtr_packet_listen_SOURCES = \ |
| test/packet_listen.c |
| |
| endif # if CYGWIN |
| |
| |
| if BUILD_BASH_COMPLETION |
| dist_bashcompletion_DATA = bash-completion/mtr |
| endif |
| |
| dist-hook: |
| $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version |
|
|