Annotation of embedaddon/iftop/Makefile.OLD, revision 1.1

1.1     ! misho       1: #
        !             2: # Makefile:
        !             3: # Makefile for iftop.
        !             4: #
        !             5: # $Id: Makefile.OLD,v 1.1 2002/11/04 12:29:06 chris Exp $
        !             6: #
        !             7: 
        !             8: VERSION = 0.11pre1
        !             9: 
        !            10: # C compiler to use.
        !            11: #CC = gcc
        !            12: 
        !            13: # Give the location of pcap.h here:
        !            14: CFLAGS += -I/usr/include/pcap -g
        !            15: # CFLAGS += -I/usr/pkg/include
        !            16: # CFLAGS += -pg -a
        !            17: 
        !            18: # Give the location of libpcap here if it's not in one of the standard
        !            19: # directories:
        !            20: # LDFLAGS += -L/usr/local/lib
        !            21: # LDFLAGS += -pg -a
        !            22: 
        !            23: # Do you want to use curses or ncurses? Probably ncurses, unless curses
        !            24: # is ncurses on your machine.
        !            25: CURSES = ncurses
        !            26: #CURSES = curses
        !            27: 
        !            28: #
        !            29: # Name resolution. Sensible systems have gethostbyaddr_r, which is reentrant
        !            30: # and can be called from several threads of a multithreaded program. Other
        !            31: # systems don't, or their implementations don't work ([cough] FreeBSD). For
        !            32: # these you can use gethostbyaddr (not recommended, since then only one thread
        !            33: # can resolve a name at once), libresolv (not recommended and may not work
        !            34: # depending on which header files you have), or ares, an asynchronous DNS
        !            35: # resolution library from
        !            36: #   ftp://athena-dist.mit.edu/pub/ATHENA/ares/
        !            37: # For systems without a working gethostbyaddr_r, this is recommended.
        !            38: #
        !            39: # Leave exactly one of these uncommented, or comment all of them out if you
        !            40: # don't care about name resolution at all.
        !            41: #
        !            42: CFLAGS += -DUSE_GETHOSTBYADDR_R
        !            43: #CFLAGS += -DUSE_GETHOSTBYADDR
        !            44: #CFLAGS += -DUSE_LIBRESOLV
        !            45: #CFLAGS += -DUSE_ARES
        !            46: 
        !            47: #
        !            48: # On some machines, gethostbyaddr_r returns int; on others, struct hostent*.
        !            49: # Comment out this line if you are using one of the latter.
        !            50: #
        !            51: #CFLAGS += -DGETHOSTBYADD_R_RETURNS_INT
        !            52: 
        !            53: #
        !            54: # Uncomment if you are using libresolv.
        !            55: #
        !            56: #LDLIBS += -lresolv # or /usr/lib/libresolv.a on Linux?
        !            57: 
        !            58: #
        !            59: # Uncomment if you are using ares.
        !            60: #
        !            61: #LDLIBS += -lares 
        !            62: # ... and uncomment these if your libares is in an unusual place.
        !            63: #CFLAGS += -I/software/include
        !            64: #LDFLAGS += -L/software/lib
        !            65: 
        !            66: #
        !            67: # Solaris needs a library to make sockets go and lacks inet_aton.
        !            68: #
        !            69: LDLIBS += -lsocket -lnsl
        !            70: CFLAGS += -DFAKE_INET_ATON
        !            71: 
        !            72: # PREFIX specifies the base directory for the installation.
        !            73: PREFIX = /usr/local
        !            74: #PREFIX = /software
        !            75: 
        !            76: # BINDIR is where the binary lives relative to PREFIX (no leading /).
        !            77: BINDIR = sbin
        !            78: 
        !            79: # MANDIR is where the manual page goes.
        !            80: MANDIR = man
        !            81: #MANDIR = share/man     # FHS-ish
        !            82: 
        !            83: # You shouldn't need to change anything below this point.
        !            84: CFLAGS  += -g -Wall "-DIFTOP_VERSION=\"$(VERSION)\""
        !            85: LDFLAGS += -g #-pthread
        !            86: LDLIBS += -lpcap -l$(CURSES) -lm -lpthread
        !            87: 
        !            88: SRCS = iftop.c addr_hash.c hash.c ns_hash.c resolver.c ui.c util.c sorted_list.c\
        !            89:        options.c serv_hash.c threadprof.c edline.c screenfilter.c
        !            90: HDRS = addr_hash.h hash.h iftop.h ns_hash.h resolver.h sorted_list.h ui.h options.h sll.h\
        !            91:        serv_hash.h threadprof.h ether.h ip.h tcp.h screenfilter.h token.h llc.h \
        !            92:        extract.h ethertype.h
        !            93: TXTS = README CHANGES INSTALL TODO iftop.8 COPYING
        !            94: SPECFILE = iftop.spec iftop.spec.in
        !            95: 
        !            96: OBJS = $(SRCS:.c=.o)
        !            97: 
        !            98: iftop: $(OBJS) Makefile
        !            99:        $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) 
        !           100: 
        !           101: integers.h: integers
        !           102:        ./integers
        !           103: 
        !           104: install: iftop
        !           105:        install -D iftop   $(PREFIX)/$(BINDIR)/iftop
        !           106:        install -D iftop.8 $(PREFIX)/$(MANDIR)/man8/iftop.8
        !           107: 
        !           108: uninstall:
        !           109:        rm -f $(PREFIX)/$(BINDIR)/iftop $(PREFIX)/$(MANDIR)/man8/iftop.8
        !           110: 
        !           111: %.o: %.c Makefile
        !           112:        $(CC) $(CFLAGS) -c -o $@ $<
        !           113: 
        !           114: clean:
        !           115:        rm -f *~ *.o core iftop iftop.spec
        !           116: 
        !           117: tarball: depend $(SRCS) $(HDRS) $(TXTS) $(SPECFILE)
        !           118:        mkdir iftop-$(VERSION)
        !           119:        set -e ; for i in Makefile depend $(SRCS) $(HDRS) $(TXTS) $(SPECFILE) ; do cp $$i iftop-$(VERSION)/$$i ; done
        !           120:        tar cvf - iftop-$(VERSION) | gzip --best > iftop-$(VERSION).tar.gz
        !           121:        rm -rf iftop-$(VERSION)
        !           122: 
        !           123: tags :
        !           124:        etags *.c *.h
        !           125: 
        !           126: depend: $(SRCS)
        !           127:        $(CPP) $(CFLAGS)  -MM $(SRCS) > depend
        !           128: 
        !           129: nodepend:
        !           130:        rm -f depend
        !           131: 
        !           132: iftop.spec: iftop.spec.in Makefile
        !           133:        sed 's/__VERSION__/$(VERSION)/' < iftop.spec.in > iftop.spec
        !           134:   
        !           135:         
        !           136: include depend

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