File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / mtr / Makefile.am
Revision 1.1.1.4 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Sep 27 11:18:58 2023 UTC (8 months, 1 week ago) by misho
Branches: mtr, elwix, MAIN
CVS tags: v0_95, HEAD
Version 0.95

    1: EXTRA_DIST = \
    2: 	BSDCOPYING \
    3: 	SECURITY \
    4: 	build-aux/mtr.bat \
    5: 	img/mtr_icon.xpm
    6: 	$(TEST_FILES)
    7: 
    8: sbin_PROGRAMS = mtr mtr-packet
    9: TESTS = \
   10: 	test/cmdparse.py \
   11: 	test/param.py \
   12: 	test/probe.py
   13: 
   14: TEST_FILES = \
   15: 	test/cmdparse.py \
   16: 	test/mtrpacket.py \
   17: 	test/param.py \
   18: 	test/probe.py \
   19: 	test/lint.sh
   20: EXTRA_DIST += $(TEST_FILES)
   21: 
   22: PATHFILES =
   23: CLEANFILES = $(PATHFILES)
   24: EXTRA_DIST += $(PATHFILES:=.in)
   25: 
   26: #
   27: #  We would use % pattern matching here, but that is a GNU make
   28: #  extension and doesn't work on FreeBSD.
   29: #
   30: mtr-packet.8: $(srcdir)/man/mtr-packet.8.in
   31: 	$(AM_V_GEN) $(srcdir)/build-aux/mangen.sh "$(VERSION)" \
   32: 		$(srcdir)/man/mtr-packet.8.in $@
   33: 
   34: mtr.8: $(srcdir)/man/mtr.8.in
   35: 	$(AM_V_GEN) $(srcdir)/build-aux/mangen.sh "$(VERSION)" \
   36: 		$(srcdir)/man/mtr.8.in $@
   37: 
   38: $(PATHFILES): Makefile
   39: 
   40: dist_man_MANS = mtr.8 mtr-packet.8
   41: PATHFILES += man/mtr.8 man/mtr-packet.8
   42: 
   43: install-exec-hook:
   44: 	`setcap cap_net_raw+ep $(DESTDIR)$(sbindir)/mtr-packet` \
   45: 	|| chmod u+s $(DESTDIR)$(sbindir)/mtr-packet
   46: 
   47: mtr_SOURCES = ui/mtr.c ui/mtr.h \
   48:               ui/net.c ui/net.h \
   49:               ui/cmdpipe.c ui/cmdpipe.h \
   50:               ui/dns.c ui/dns.h \
   51:               ui/raw.c ui/raw.h \
   52:               ui/split.c ui/split.h \
   53:               ui/display.c ui/display.h \
   54:               ui/report.c ui/report.h \
   55:               ui/select.c ui/select.h \
   56:               ui/utils.c ui/utils.h \
   57:               packet/cmdparse.c packet/cmdparse.h \
   58:               packet/sockaddr.c packet/sockaddr.h \
   59:               ui/mtr-curses.h \
   60:               img/mtr_icon.xpm \
   61:               ui/mtr-gtk.h
   62: 
   63: if WITH_ERROR
   64: mtr_SOURCES += \
   65: 	portability/error.h \
   66: 	portability/error.c
   67: endif
   68: 
   69: if WITH_GETOPT
   70: mtr_SOURCES += \
   71: 	portability/getopt.h \
   72: 	portability/getopt.c \
   73: 	portability/getopt1.c
   74: endif
   75: 
   76: if WITH_IPINFO
   77: mtr_SOURCES += ui/asn.c ui/asn.h
   78: endif
   79: 
   80: if WITH_CURSES
   81: mtr_SOURCES += ui/curses.c
   82: endif
   83: 
   84: if WITH_GTK
   85: mtr_SOURCES += ui/gtk.c
   86: endif
   87: 
   88: if WITH_LIBASAN
   89: ASAN_CFLAGS = -fno-omit-frame-pointer
   90: ASAN_CFLAGS += -fsanitize=undefined
   91: ASAN_CFLAGS += -fsanitize=address
   92: endif
   93: 
   94: mtr_INCLUDES = $(GLIB_CFLAGS) -I$(top_builddir) -I$(top_srcdir)
   95: mtr_CFLAGS = $(GTK_CFLAGS) $(NCURSES_CFLAGS) $(ASAN_CFLAGS) $(JANSSON_CFLAGS)
   96: mtr_LDADD = $(GTK_LIBS) $(NCURSES_LIBS) $(RESOLV_LIBS) $(JANSSON_LIBS)
   97: 
   98: 
   99: mtr_packet_SOURCES = \
  100: 	portability/queue.h \
  101: 	packet/packet.c \
  102: 	packet/cmdparse.c packet/cmdparse.h \
  103: 	packet/command.c packet/command.h \
  104: 	packet/platform.h \
  105: 	packet/probe.c packet/probe.h \
  106: 	packet/protocols.h \
  107: 	packet/timeval.c packet/timeval.h \
  108: 	packet/wait.h \
  109: 	packet/sockaddr.c packet/sockaddr.h
  110: 
  111: mtr_packet_LDADD = $(CAP_LIBS)
  112: 
  113: 
  114: if WITH_ERROR
  115: mtr_packet_SOURCES += \
  116: 	portability/error.h \
  117: 	portability/error.c
  118: endif
  119: 
  120: 
  121: if CYGWIN
  122: 
  123: mtr_packet_SOURCES += \
  124: 	packet/probe_cygwin.c packet/probe_cygwin.h \
  125: 	packet/wait_cygwin.c
  126: mtr_packet_LDADD += -lcygwin -liphlpapi -lws2_32
  127: 
  128: dist_windows_aux = \
  129: 	$(srcdir)/build-aux/mtr.bat \
  130: 	$(srcdir)/AUTHORS \
  131: 	$(srcdir)/BSDCOPYING \
  132: 	$(srcdir)/COPYING \
  133: 	$(srcdir)/README \
  134: 	$(srcdir)/NEWS
  135: 
  136: distwindir = $(distdir)-win-$(host_cpu)
  137: 
  138: #  Bundle necessary files for a Windows binary distribution
  139: distdir-win: $(dist_windows_aux) mtr.exe mtr-packet.exe
  140: 	rm -fr $(distwindir)
  141: 	mkdir -p $(distwindir) $(distwindir)/bin $(distwindir)/terminfo
  142: 	cp $(dist_windows_aux) -t $(distwindir)
  143: 	cp mtr.exe mtr-packet.exe -t $(distwindir)/bin
  144: 	ldd mtr.exe | grep -v cygdrive | awk '{ print $$3 }' | xargs cp -t $(distwindir)/bin
  145: 	cp `find /usr/share/terminfo -name cygwin | xargs dirname` -r $(distwindir)/terminfo
  146: 
  147: #  Zip up a Windows binary distribution
  148: dist-windows-bin: distdir-win
  149: 	rm -f $(distwindir).zip
  150: 	zip -rq $(distwindir).zip $(distwindir)
  151: 	rm -fr $(distwindir)
  152: 
  153: else  # if CYGWIN
  154: 
  155: check_PROGRAMS = mtr-packet-listen
  156: 
  157: mtr_packet_SOURCES += \
  158: 	packet/construct_unix.c packet/construct_unix.h \
  159: 	packet/deconstruct_unix.c packet/deconstruct_unix.h \
  160: 	packet/probe_unix.c packet/probe_unix.h \
  161: 	packet/wait_unix.c
  162: 
  163: mtr_packet_listen_SOURCES = \
  164: 	test/packet_listen.c
  165: 
  166: endif  # if CYGWIN
  167: 
  168: 
  169: if BUILD_BASH_COMPLETION
  170: dist_bashcompletion_DATA = bash-completion/mtr
  171: endif
  172: 
  173: dist-hook:
  174: 	$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>