home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / N / TCPIP / NET-TOOL.1 / NET-TOOL / net-tools / Makefile < prev    next >
Encoding:
Makefile  |  1995-01-11  |  2.6 KB  |  113 lines

  1. #
  2. # NET-BASE    A collection of programs that form the base set of the
  3. #        NET-2 Networking Distribution for the LINUX operating
  4. #        system.
  5. #
  6. # Version:    @(#)Makefile    0.32    01/16/94
  7. #
  8. # Author:    Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
  9. #        Copyright 1988-1993 MicroWalt Corporation
  10. #
  11. #        Extensively modified from 01/21/94 onwards by
  12. #        Alan Cox <A.Cox@swansea.ac.uk>
  13. #        Copyright 1993-1994 Swansea University Computer Society
  14. #
  15. #        This program is free software; you can redistribute it
  16. #        and/or  modify it under  the terms of  the GNU General
  17. #        Public  License as  published  by  the  Free  Software
  18. #        Foundation;  either  version 2 of the License, or  (at
  19. #        your option) any later version.
  20. #
  21.  
  22. RELEASE    = tools-1.1.79
  23.  
  24.  
  25. .EXPORT_ALL_VARIABLES:
  26.  
  27. CC    = cc -O6 -Wall
  28. LD    = cc
  29.  
  30. CFLAGS    = -I. -I.. -Ilib -I../lib -DLINUX #-DDEBUG
  31. LDFLAGS    = -Llib -L../lib -N -s
  32.  
  33. LIBS    = -lsupport
  34.  
  35.  
  36. PROGS    = ifconfig hostname arp netstat route slattach rarp plipconfig dnsdomainname ipfw
  37. SUBDIRS    = 
  38.  
  39. .c.o:        $<
  40.         $(CC) $(CFLAGS) -c $<
  41.  
  42.  
  43. all:        config.h version.h $(PROGS) subdirs
  44.  
  45. install:    all
  46.         @sh ./Install.sh
  47.  
  48. update:        all
  49.         @sh ./Install.sh --nobackup
  50.  
  51. clean:
  52.         rm -f *.o config.new version.h *~
  53.         @for i in lib $(SUBDIRS); do cd $$i && make clean && cd ..; done
  54.  
  55. clobber:    clean
  56.         rm -f $(PROGS) config.h config.status
  57.         @for i in lib $(SUBDIRS); do cd $$i && make clobber && cd ..; done
  58.  
  59. dist:
  60.         @echo Creating net-$(RELEASE) in ..
  61.         @tar cfvz ../net-$(RELEASE).tar.gz *
  62.  
  63. config.h:    Makefile config.in
  64.         @echo "Configuring the NET-3 Base Utilities..." ; echo
  65.         @if [ -f config.status ]; \
  66.             then /bin/sh ./Configure.sh <config.status; \
  67.            else /bin/sh ./Configure.sh <config.in; \
  68.          fi
  69.  
  70. version.h:    Makefile
  71.         @echo "#define RELEASE \"NET-3 Base Utilities release $(RELEASE)\"" >version.h
  72.  
  73. ifconfig:    lib/libsupport.a ifconfig.o
  74.         $(CC) $(LDFLAGS) -o ifconfig ifconfig.o $(LIBS)
  75.  
  76. hostname:    hostname.o
  77.         $(CC) $(LDFLAGS) -o hostname hostname.o
  78.  
  79. plipconfig:    plipconfig.o
  80.         $(CC) $(LDFLAGS) -o plipconfig plipconfig.o
  81.  
  82. route:        lib/libsupport.a route.o
  83.         $(CC) $(LDFLAGS) -o route route.o $(LIBS)
  84.  
  85. arp:        lib/libsupport.a arp.o
  86.         $(CC) $(LDFLAGS) -o arp arp.o $(LIBS)
  87.  
  88. rarp:        lib/libsupport.a rarp.o
  89.         $(CC) $(LDFLAGS) -o rarp rarp.o $(LIBS)
  90.  
  91. slattach:    lib/libsupport.a slattach.o
  92.         $(CC) $(LDFLAGS) -o slattach slattach.o $(LIBS)
  93.  
  94. netstat:    lib/libsupport.a netstat.o
  95.         $(CC) $(LDFLAGS) -o netstat netstat.o $(LIBS)
  96.  
  97. ipfw:        ipfw.o
  98.         $(CC) $(LDFLAGS) -o ipfw ipfw.o $(LIBS)
  99.  
  100. dnsdomainname:    hostname
  101.         ln -f hostname dnsdomainname
  102.  
  103. subdirs:    
  104.         @for i in $(SUBDIRS); do (cd $$i; $(MAKE)); done
  105.  
  106. lib/libsupport.a:
  107.         @(cd lib ; $(MAKE))
  108.  
  109. netstat.o:    netstat.c
  110.         $(CC) $(CFLAGS) -D__KERNEL__ -c $<
  111.  
  112. # End of Makefile.
  113.