diff --git a/Makefile b/Makefile index c04a97e..52fb500 100644 --- a/Makefile +++ b/Makefile @@ -27,23 +27,17 @@ MANDIR = man #MANDIR = share/man # FHS-ish # You shouldn't need to change anything below this point. -CFLAGS += -g -Wall +VERSION = 0.1 +CFLAGS += -g -Wall "-DIFTOP_VERSION=\"$(IFTOPVERSION)\"" LDFLAGS += -g LDLIBS += -lpcap -lpthread -lcurses -lm -SRCS = iftop.c \ - addr_hash.c \ - hash.c \ - ns_hash.c \ - resolver.c \ - ui.c \ - util.c \ - sorted_list.c +SRCS = iftop.c addr_hash.c hash.c ns_hash.c resolver.c ui.c util.c sorted_list.c +HDRS = addr_hash.h hash.h iftop.h ns_hash.h resolver.h sorted_list.h ui.h +TXTS = README INSTALL TODO iftop.8 OBJS = $(SRCS:.c=.o) -HDRS = addr_hash.h - # If you do not have makedepend, you will need to remove references to depend # and nodepend below. iftop: depend $(OBJS) Makefile @@ -62,6 +56,12 @@ uninstall: clean: nodepend rm -f *~ *.o core iftop +tarball: nodepend $(SRCS) $(HDRS) $(TXTS) + mkdir iftop-$(VERSION) + set -e ; for i in Makefile $(SRCS) $(HDRS) $(TXTS) ; do cp $$i iftop-$(VERSION)/$$i ; done + tar cvf - iftop-$(VERSION) | gzip --best > iftop-$(VERSION).tar.gz + rm -rf iftop-$(VERSION) + tags : etags *.c *.h