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 / Makefile next >
Encoding:
Makefile  |  1994-03-11  |  1.0 KB  |  61 lines

  1. #
  2. # Makefile for Linux specific functions
  3. #
  4.  
  5. TOPDIR=..
  6.  
  7. include $(TOPDIR)/Makeconfig
  8. include $(TOPDIR)/Makerules
  9.  
  10. .PHONY: lib
  11.  
  12. DIRS=lib
  13. LIBS=$(TOPDIR)/libalias.a lib/libc.a
  14. CRT0=./lib/$(TARGET_ARCH)/crt/crt0.o
  15. PROGS=sln
  16.  
  17. all: lib $(PROGS)
  18.  
  19. sln: sln.o
  20.     $(LD) -N -dll-verbose -static -o $@ $(CRT0) $? $(LIBS) \
  21.         `gcc -b $(TARGET_MACHINE) --print`
  22.  
  23. install: $(PROGS)
  24.     @if [ -d $(TARGET_SBIN_DIR) ]; then \
  25.       echo installing $(PROGS) to $(TARGET_SBIN_DIR)/; \
  26.       cp $(PROGS) $(TARGET_SBIN_DIR)/; \
  27.     else \
  28.       echo \"$(TARGET_SBIN_DIR)\" is not a directory!; \
  29.       exit 1; \
  30.     fi
  31.  
  32. asm: $(ASMS)
  33.  
  34. clean::
  35.     $(RM) -f core *.i *.s *.o *.a tmp_make foo $(PROGS)
  36.  
  37. realclean::
  38.     $(RM) -f core *.i *.s *.o *.a tmp_make foo $(PROGS) .depend
  39.  
  40. depend::
  41.     $(CC) $(CFLAGS) -M *.c > .depend
  42.  
  43. ifneq ($(DIRS),)
  44. lib realclean clean depend::
  45.     @for i in $(DIRS); \
  46.     do \
  47.         echo making $@ in $$i; \
  48.         ($(MAKE) -C $$i $@); \
  49.     done
  50. else
  51. lib::
  52.     @true
  53. endif
  54.  
  55. #
  56. # include a dependency file if one exists
  57. #
  58. ifeq (.depend,$(wildcard .depend))
  59. include .depend
  60. endif
  61.