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.dist < prev    next >
Makefile  |  1990-01-29  |  3KB  |  95 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.  
  32. # Set DESTDIR to the directory in which the traceroute executable will be
  33. # installed.  /usr/etc is a good place to put a network debugging tool such
  34. # as this.
  35.  
  36. DESTDIR= /usr/etc
  37.  
  38. # You shouldn't need to change anything below this line.
  39.  
  40. CC= cc
  41. CFLAGS = -O
  42. KFLAGS= -fsoft -DKERNEL -D$(ARCH_K)
  43.  
  44. # At the moment, the INCL variable isn't really needed for anything.
  45. INCL = -I.
  46. LIBS = 
  47. MANDIR= /usr/man/man8
  48.  
  49. # SUN_INCL_DIR should be set to the full pathname of the system include
  50. # directory in which ip_icmp.h lives.  For SunOS 4.0.3 and 4.0.3c, this is
  51. # /usr/include/netinet.
  52. SUN_INCL_DIR= /usr/include/netinet
  53.  
  54. # SYS_OBJ_DIR is the directory in which kernel object modules live.
  55. # Assuming you set ARCH_K properly above, you shouldn't need to change
  56. # this.
  57. SYS_OBJ_DIR= /sys/$(ARCH_K)/OBJ
  58.  
  59.  
  60. all: traceroute ip_icmp.o raw_ip.o
  61.  
  62. traceroute: traceroute.c
  63.     $(CC) $(CFLAGS) $(INCL) -o traceroute traceroute.c $(LIBS)
  64.  
  65. ip_icmp.o: $(SUN_INCL_DIR)/ip_icmp.h
  66.     $(CC) $(CFLAGS) $(KFLAGS) $(INCL) -c ip_icmp.c
  67.  
  68. raw_ip.o:
  69.     $(CC) $(CFLAGS) $(KFLAGS) $(INCL) -c raw_ip.c
  70.  
  71. install: all
  72.     install -o root -g bin -m 4755 traceroute ${DESTDIR}
  73.     install -o root -g staff -m 755 traceroute.8 ${MANDIR}
  74.     install -o root -g staff -m 444 ip_icmp.o $(SYS_OBJ_DIR)
  75.     install -o root -g staff -m 444 raw_ip.o $(SYS_OBJ_DIR)
  76.     @ echo ""
  77.     @ echo "Binaries and man page installed."
  78.     @ echo ""
  79.     @ echo "NOW YOU MUST RECOMPILE AND REINSTALL YOUR KERNEL!!"
  80.     @ echo "IF YOU DO NOT, THEN TRACEROUTE WILL NOT BE ENABLED."
  81.  
  82. lint:
  83.     lint -b -h -x $(INCL) traceroute.c | \
  84.       grep -v 'possible pointer alignment problem'
  85.  
  86. $(SUN_INCL_DIR)/ip_icmp.h: ./ip_icmp.h
  87.     mv $(SUN_INCL_DIR)/ip_icmp.h   $(SUN_INCL_DIR)/ip_icmp.h.old
  88.     cp -p ./ip_icmp.h   $(SUN_INCL_DIR)
  89.  
  90. clean:
  91.     rm -f *.o traceroute
  92.  
  93. FRC:
  94.  
  95.