home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / sbin / lib / Makefile < prev   
Encoding:
Makefile  |  1994-03-11  |  799 b   |  51 lines

  1. #
  2. # Makefile for Linux specific functions
  3. #
  4.  
  5. TOPDIR=../..
  6.  
  7. include $(TOPDIR)/Makeconfig
  8. include $(TOPDIR)/Makerules
  9.  
  10. LIB:=libc.a
  11.  
  12. DIRS=$(TARGET_ARCH)
  13.  
  14. INC_CFLAGS= -I$(TOPDIR)/sysdeps/linux/$(TARGET_ARCH) -I$(TOPDIR)
  15.  
  16. SRCS=__stat.c __lstat.c __symlink.c __link.c __main.c \
  17.     __environ.c errno.c __unlink.c
  18. OBJS= $(SRCS:.c=.o)
  19. ASMS= $(SRCS:.c=.s)
  20.  
  21. lib:: $(LIB)
  22.  
  23. $(LIB): $(OBJS)
  24.     $(AR) uvc $(LIB) $?
  25.     -$(AR) -d $(LIB) __.SYMDEF
  26.     $(REALRANLIB) $(LIB)
  27.  
  28. asm: $(ASMS)
  29.  
  30. obj: $(OBJS)
  31.  
  32. clean realclean::
  33.     $(RM) -f core *.o *.a *.s *.i tmp_make foo
  34.  
  35. depend::
  36.     $(CC) -M $(CFLAGS) $(SRCS) > .depend
  37.  
  38. ifneq ($(DIRS),)
  39. lib clean realclean depend::
  40.     for d in $(DIRS); do \
  41.       ($(MAKE) -C $$d $@); \
  42.     done
  43. endif
  44.  
  45. #
  46. # include a dependency file if one exists
  47. #
  48. ifeq (.depend,$(wildcard .depend))
  49. include .depend
  50. endif
  51.