home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / source / sh / std / stdc / makefile < prev    next >
Makefile  |  1995-05-18  |  1KB  |  68 lines

  1. # Standard C (ANSI) compatabilaty
  2.  
  3. SHELL = /bin/sh
  4.  
  5. # This is for the sun386i your mileage may vary :-)
  6. #CC=gcc -ansi -Dsun386 -Dsun -Di386
  7.  
  8. CONFIG = -D_SYSV
  9. #CONFIG = -D_BSD
  10.  
  11. LN = ln
  12. #RANLIB = ranlib        # For BSD systems
  13. RANLIB = echo Updated
  14.  
  15. LIB = libstdc.a
  16. INCL = ../h
  17.  
  18. CFLAGS = $(CCOPTS) -I$(INCL) $(CONFIG)
  19.  
  20. MISC =    Makefile stdio.h_std
  21. HDRS =    limits.h stddef.h stdlib.h string.h time.h stdarg.h 
  22. SRCS =    strstr.c memmove.c stdio.c #clock.c
  23. OBJS =    strstr.o memmove.o stdio.o #clock.o 
  24.  
  25. all:    $(LIB)
  26.  
  27. link:    $(HDRS) stdio.h 
  28.     [ -d $(INCL) ] || mkdir $(INCL)
  29.     [ -d $(INCL)/sys ] || mkdir $(INCL)/sys
  30.     -$(LN) types.h $(INCL)/sys
  31.     -$(LN) limits.h stddef.h stdlib.h stdio.h string.h time.h stdarg.h $(INCL)
  32.  
  33. $(LIB):    $(OBJS)
  34.     ar r $@ $?
  35.     $(RANLIB) $@
  36.  
  37. stdio.h: stdio.h_std stdio.sed /usr/include/stdio.h 
  38.     sed -f stdio.sed </usr/include/stdio.h >stdio.hacked
  39.     sed <stdio.h_std >stdio.h -e '/%%%/ r stdio.hacked'
  40.     rm stdio.hacked
  41.  
  42. clean:
  43.     -rm -f *.o *.out stdio.hacked
  44.  
  45. clobber: clean
  46.     -rm -f $(LIB) stdio.h
  47.  
  48. string.h: stddef.h
  49.  
  50. stdlib.h: stddef.h
  51.  
  52. stdio.h: stddef.h 
  53.  
  54. time.h: stddef.h
  55.  
  56. stdio.o: stdio.h
  57.  
  58. setvbuf.o: stdlib.h stdio.h
  59.  
  60. fprintf.o: stdarg.h stdio.h
  61.  
  62. sprintf.o: stdarg.h stdio.h
  63.  
  64. vprintf.o: stdarg.h stdio.h
  65.  
  66. strstr.o: string.h 
  67.  
  68.