home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / net / Makefile next >
Encoding:
Makefile  |  1995-01-11  |  1020 b   |  54 lines

  1. #
  2. # Makefile for the linux networking.
  3. #
  4. # Note! Dependencies are done automagically by 'make dep', which also
  5. # removes any old dependencies. DON'T put your own dependencies here
  6. # unless it's something special (ie not a .c file).
  7. #
  8. # Note 2! The CFLAGS definition is now in the main makefile...
  9.  
  10. # only these two lines should need to be changed to remove inet sockets.
  11. # (and the inet/tcpip.o in net.o)
  12.  
  13. SUBDIRS     := unix inet
  14.  
  15. SUBOBJS     := $(foreach f,$(SUBDIRS),$f/$f.o)
  16.  
  17. .c.o:
  18.     $(CC) $(CFLAGS) -c $<
  19. .s.o:
  20.     $(AS) -o $*.o $<
  21. .c.s:
  22.     $(CC) $(CFLAGS) -S $<
  23.  
  24. OBJS    =  socket.o protocols.o
  25.  
  26. all:        net.o
  27.  
  28. net.o:        $(OBJS) network.a
  29.         $(LD) -r -o net.o $(OBJS) network.a
  30.  
  31. network.a:    subdirs
  32.         rm -f $@
  33.         ar rc $@ $(SUBOBJS)
  34.         ranlib $@
  35.  
  36. subdirs:    dummy
  37.         set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i; done
  38.  
  39. dep:
  40.         $(CPP) -M *.c > .depend
  41.         set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i dep; done
  42.  
  43. modules:
  44.  
  45. dummy:
  46.  
  47. #
  48. # include a dependency file if one exists
  49. #
  50. ifeq (.depend,$(wildcard .depend))
  51. include .depend
  52. endif
  53.  
  54.