1 AUTOMAKE_OPTIONS = foreign no-dependencies
6 AM_CFLAGS = -Wall -Werror
9 include_HEADERS = oping.h
10 lib_LTLIBRARIES = liboping.la
12 # version-info: current:revision:age
14 # * If the library source code has changed at all since the last update, then
15 # increment revision (‘c:r:a’ becomes ‘c:r+1:a’).
16 # * If any interfaces have been added, removed, or changed since the last
17 # update, increment current, and set revision to 0.
18 # * If any interfaces have been added since the last public release, then
20 # * If any interfaces have been removed since the last public release, then
23 # <http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html>
24 liboping_la_SOURCES = oping.h liboping.c
26 liboping_la_CPPFLAGS = $(AM_CPPFLAGS)
27 liboping_la_LDFLAGS = $(AM_LDFLAGS) -version-info @LIBOPING_CURRENT@:@LIBOPING_REVISION@:@LIBOPING_AGE@
29 if BUILD_WITH_LIBSOCKET
30 liboping_la_LIBADD += -lsocket
33 liboping_la_LIBADD += -lxnet
38 oping_SOURCES = oping.c
39 oping_LDADD = liboping.la -lm
44 if BUILD_WITH_LIBNCURSES
45 bin_PROGRAMS += noping
47 noping_SOURCES = oping.c
48 noping_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_NCURSES=1
49 noping_LDADD = liboping.la -lm -lncurses
53 endif # BUILD_WITH_LIBNCURSES
56 @if test "x0" = "x$$UID"; then \
57 if test "xLinux" = "x`uname -s`"; then \
58 echo "Setting CAP_NET_RAW capability on binaries."; \
59 setcap cap_net_raw=ep $(DESTDIR)$(bindir)/oping || true; \
60 setcap cap_net_raw=ep $(DESTDIR)$(bindir)/noping || true; \
62 echo "Setting set-UID bit on binaries."; \
63 chmod u+s $(DESTDIR)$(bindir)/oping || true; \
64 chmod u+s $(DESTDIR)$(bindir)/noping || true; \