home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / pdksh-4.9-src.tgz / tar.out / contrib / pdksh / std / stdc / Makefile < prev    next >
Makefile  |  1996-09-28  |  2KB  |  110 lines

  1. # Standard C (ANSI) compatabilaty
  2. # $Id: Makefile,v 1.4 93/05/05 21:18:06 sjg Exp $
  3.  
  4. # edit this makefile such that only the functions that
  5. # your systems doesn't have are provided.
  6.  
  7. SHELL = /bin/sh
  8. MAKE  = make
  9.  
  10. #CONFIG = -D_SYSV
  11. CONFIG = -D_BSD
  12.  
  13. LN = ln
  14. RANLIB = ranlib        # For BSD systems
  15. #RANLIB = echo Updated
  16.  
  17. LIB = ../libstdc.a
  18. INCL = ../h
  19.  
  20. CFLAGS = $(CCOPTS) -I$(INCL) $(CONFIG)
  21.  
  22. MISC =    Makefile #stdio.h_std
  23. HDRS =    limits.h stddef.h stdlib.h string.h time.h #stdarg.h 
  24. SYSHDRS = types.h
  25.  
  26. SRCS =    strstr.c memmove.c stdio.c clock.c fprintf.c memchr.c \
  27.     memcmp.c memcpy.c memset.c setvbuf.c sprintf.c \
  28.     stdio.c strcat.c strchr.c strcmp.c strcpy.c strcspn.c \
  29.     strerror.c strlen.c strncat.c strncmp.c strncpy.c \
  30.     strpbrk.c strrchr.c strspn.c strtok.c vprintf.c
  31.  
  32. # only add to this list the modules that you _need_
  33. # some of these are untested!
  34. OBJS =    $(LIB)(strstr.o) \
  35.     $(LIB)(memmove.o) \
  36.     $(LIB)(clock.o) \
  37. #    $(LIB)(vprintf.o) \
  38. #    $(LIB)(fprintf.o) \
  39. #    $(LIB)(sprintf.o) \
  40. #    $(LIB)(strtok.o) \
  41. #    $(LIB)(memchr.o) \
  42. #    $(LIB)(memcmp.o) \
  43. #    $(LIB)(memcpy.o) \
  44. #    $(LIB)(memset.o) \
  45. #    $(LIB)(setvbuf.o) \
  46. #    $(LIB)(strcat.o) \
  47. #    $(LIB)(strchr.o) \
  48. #    $(LIB)(strcmp.o) \
  49. #    $(LIB)(strcpy.o) \
  50. #    $(LIB)(strcspn.o) \
  51. #    $(LIB)(strerror.o) \
  52. #    $(LIB)(strlen.o) \
  53. #    $(LIB)(strncat.o) \
  54. #    $(LIB)(strncmp.o) \
  55. #    $(LIB)(strncpy.o) \
  56. #    $(LIB)(strpbrk.o) \
  57. #    $(LIB)(strrchr.o) \
  58. #    $(LIB)(strspn.o) \
  59. #    $(LIB)(stdio.o) 
  60. #
  61.  
  62.  
  63.  
  64. all:    $(LIB)
  65.  
  66. link:    $(HDRS) #stdio.h 
  67.     [ -d $(INCL) ] || mkdir $(INCL)
  68.     [ -d $(INCL)/sys ] || mkdir $(INCL)/sys
  69.     ($(SHELL) ../mklinks $(INCL) $(HDRS))
  70.     ($(SHELL) ../mklinks $(INCL)/sys $(SYSHDRS))
  71. #    ($(SHELL) ../mklinks $(INCL) stdio.h)
  72.  
  73. $(LIB):    $(OBJS)
  74. # if you make doesn't know how to put objects in libraries
  75. # then simply make all the .o's and use the following line
  76. #    ar r $@ $?
  77.     $(RANLIB) $@
  78.  
  79. stdio.h: stdio.h_std stdio.sed /usr/include/stdio.h 
  80.     sed -f stdio.sed </usr/include/stdio.h >stdio.hacked
  81.     sed <stdio.h_std >stdio.h -e '/%%%/ r stdio.hacked'
  82.     rm stdio.hacked
  83.  
  84. clean:
  85.     -rm -f *.o *.out stdio.hacked
  86.  
  87. clobber: clean
  88.     -rm -f $(LIB) stdio.h
  89.  
  90. string.h: stddef.h
  91.  
  92. stdlib.h: stddef.h
  93.  
  94. stdio.h: stddef.h 
  95.  
  96. time.h: stddef.h
  97.  
  98. stdio.o: stdio.h
  99.  
  100. setvbuf.o: stdlib.h stdio.h
  101.  
  102. fprintf.o: stdarg.h stdio.h
  103.  
  104. sprintf.o: stdarg.h stdio.h
  105.  
  106. vprintf.o: stdarg.h stdio.h
  107.  
  108. strstr.o: string.h 
  109.  
  110.