home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / traceroute / Makefile < prev    next >
Makefile  |  1993-03-22  |  3KB  |  99 lines

  1.  
  2. # This Makefile will help automate the installation of the binaries that
  3. # are needed to enable Van Jacobson's traceroute.  This Makefile has been
  4. # written for and tested on a Sun 3, Sun 3x, and Sun 4 machines running
  5. # SunOS 4.0.x.  There is no reason, however, why it could not be expanded
  6. # to the 386i or other machines.
  7. #
  8. # Note that this Makefile will overwrite the existing (SunOS 4.0.x versions)
  9. # of /sys/arch/OBJ/raw_ip.o and /sys/arch/OBJ/ip_icmp.o, where "arch" is
  10. # your kernel architecture.  If you want to save the 4.0.x versions of
  11. # raw_ip.o and ip_icmp.o, you need to do this by hand before running
  12. # the Makefile. 
  13. #
  14.  
  15. # To install, set the ARCH_K and DESTDIR variables properly.  (See
  16. # accompanying notes elsewhere in the # Makefile.)
  17. #
  18. # Then become root and type "make install"
  19. #
  20. # REMINDER:
  21. # YOU MUST RECOMPILE AND REINSTALL YOUR KERNEL AFTER RUNNING THIS MAKEFILE!!
  22. # IF YOU DO NOT DO THIS, TRACEROUTE WILL NOT BE ENABLED ON YOUR MACHINE.
  23. #
  24. # Manavendra K. Thakur <thakur@zerkalo.harvard.edu>  11/24/89
  25. # Revised to fix DESTDIR. 01/29/90
  26.  
  27.  
  28. # ARCH_K should be set to the output you get when you type "arch -k"
  29. # on your system.  (Should be one of sun3, sun3x, sun4, or sun4c.)
  30. #ARCH_K= sun3
  31. ARCH_K= sun386
  32.  
  33. # Set DESTDIR to the directory in which the traceroute executable will be
  34. # installed.  /usr/etc is a good place to put a network debugging tool such
  35. # as this.
  36.  
  37. #DESTDIR= /usr/etc
  38. DESTDIR= /usr/local/bin
  39.  
  40. # You shouldn't need to change anything below this line.
  41.  
  42. CC= cc
  43. CFLAGS = -O
  44. #KFLAGS= -fsoft -DKERNEL -D$(ARCH_K)
  45. KFLAGS= -DKERNEL -D$(ARCH_K)
  46.  
  47. # At the moment, the INCL variable isn't really needed for anything.
  48. INCL = -I.
  49. LIBS = 
  50. #MANDIR= /usr/man/man8
  51. MANDIR= /usr/local/man/man8
  52.  
  53. # SUN_INCL_DIR should be set to the full pathname of the system include
  54. # directory in which ip_icmp.h lives.  For SunOS 4.0.3 and 4.0.3c, this is
  55. # /usr/include/netinet.
  56. SUN_INCL_DIR= /usr/include/netinet
  57.  
  58. # SYS_OBJ_DIR is the directory in which kernel object modules live.
  59. # Assuming you set ARCH_K properly above, you shouldn't need to change
  60. # this.
  61. SYS_OBJ_DIR= /sys/$(ARCH_K)/OBJ
  62.  
  63.  
  64. all: traceroute ip_icmp.o raw_ip.o
  65.  
  66. traceroute: traceroute.c
  67.     $(CC) $(CFLAGS) $(INCL) -o traceroute traceroute.c $(LIBS)
  68.  
  69. ip_icmp.o: $(SUN_INCL_DIR)/ip_icmp.h
  70.     $(CC) $(CFLAGS) $(KFLAGS) $(INCL) -c ip_icmp.c
  71.  
  72. raw_ip.o:
  73.     $(CC) $(CFLAGS) $(KFLAGS) $(INCL) -c raw_ip.c
  74.  
  75. install: all
  76.     install -o root -g bin -m 4755 traceroute ${DESTDIR}
  77.     install -o root -g staff -m 755 traceroute.8 ${MANDIR}
  78.     install -o root -g staff -m 444 ip_icmp.o $(SYS_OBJ_DIR)
  79.     install -o root -g staff -m 444 raw_ip.o $(SYS_OBJ_DIR)
  80.     @ echo ""
  81.     @ echo "Binaries and man page installed."
  82.     @ echo ""
  83.     @ echo "NOW YOU MUST RECOMPILE AND REINSTALL YOUR KERNEL!!"
  84.     @ echo "IF YOU DO NOT, THEN TRACEROUTE WILL NOT BE ENABLED."
  85.  
  86. lint:
  87.     lint -b -h -x $(INCL) traceroute.c | \
  88.       grep -v 'possible pointer alignment problem'
  89.  
  90. $(SUN_INCL_DIR)/ip_icmp.h: ./ip_icmp.h
  91.     mv $(SUN_INCL_DIR)/ip_icmp.h   $(SUN_INCL_DIR)/ip_icmp.h.old
  92.     cp -p ./ip_icmp.h   $(SUN_INCL_DIR)
  93.  
  94. clean:
  95.     rm -f *.o traceroute
  96.  
  97. FRC:
  98.  
  99.