home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 14 / CDACTUAL.iso / cdactual / demobin / share / program / c / ZCPP_JAE.ZIP / MAKEFILE < prev    next >
Encoding:
Text File  |  1990-07-17  |  2.2 KB  |  103 lines

  1. #
  2. #
  3. # Copyright (C) 1990 Texas Instruments Incorporated.
  4. #
  5. # Permission is granted to any individual or institution to use, copy, modify,
  6. # and distribute this software, provided that this complete copyright and
  7. # permission notice is maintained, intact, in all copies and supporting
  8. # documentation.
  9. #
  10. # Texas Instruments Incorporated provides this software "as is" without
  11. # express or implied warranty.
  12. #
  13. #
  14.  
  15. #
  16. # For a cpp without defmacro extensions use the following definitions.
  17. #
  18. #CPPFLAGS =
  19. #SRCS = cpp1.c cpp2.c cpp3.c cpp4.c cpp5.c cpp6.c
  20.  
  21. CC = cc
  22. CFLAGS = -O
  23. CPPFLAGS = -DCOOL
  24.  
  25. .SUFFIXES: .c .o
  26. .c.o:
  27.     $(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
  28.  
  29. SRCS = cpp1.c cpp2.c cpp3.c cpp4.c cpp5.c cpp6.c cpp7.c \
  30.        defmacio.c hash.c defpacka.c parmtype.c macro.c \
  31.        member.c class.c template.c exceptio.c generate.c compress.c
  32. OBJS = $(SRCS:.c=.o)
  33.  
  34. #
  35. # ** compile cpp
  36. #
  37.  
  38. cpp: $(OBJS)
  39.     $(CC) -o cpp $(OBJS)
  40.  
  41. #
  42. # ** Remove unneeded files
  43. #
  44.  
  45. clean:
  46.     rm *.o cpp
  47.  
  48. #
  49. # ** Test cpp by preprocessing itself, compiling the result,
  50. # ** repeating the process and diff'ing the result.  Note: this
  51. # ** is not a good test of cpp, but a simple verification.
  52. # ** The diff's should not report any changes.
  53. #
  54.  
  55. test:
  56.     for FILE in $(SRCS) ; do ./cpp $(CPPFLAGS) $$FILE > t_$$FILE ; done
  57.     $(CC) $(CPPFLAGS) $(CFLAGS) t_*.c
  58.     for FILE in $(SRCS) ; do ./a.out $(CPPFLAGS) $$FILE > tt_$$FILE ; done
  59.     for FILE in $(SRCS) ; do diff t_$$FILE  tt_$$FILE ; done
  60.     rm t_* tt_* a.out
  61.  
  62. #
  63. # Object module dependencies
  64. #
  65.  
  66. cpp1.o  :    cpp1.c cpp.h cppdef.h
  67.  
  68. cpp2.o  :    cpp2.c cpp.h cppdef.h
  69.  
  70. cpp3.o  :    cpp3.c cpp.h cppdef.h
  71.  
  72. cpp4.o  :    cpp4.c cpp.h cppdef.h
  73.  
  74. cpp5.o  :    cpp5.c cpp.h cppdef.h
  75.  
  76. cpp6.o  :    cpp6.c cpp.h cppdef.h
  77.  
  78. cpp7.o  :    cpp7.c cpp.h cppdef.h
  79.  
  80. defmacio.o :    defmacio.c defmacio.h
  81.  
  82. parmtype.o :    parmtype.c defmacio.h
  83.  
  84. macro.o :    macro.c macro.h defmacio.h
  85.  
  86. defpacka.o :  defpacka.c defmacio.h
  87.  
  88. hash.o :    hash.c
  89.  
  90. issame.o :    issame.c defmacio.h
  91.  
  92. member.o :    member.c defmacio.h
  93.  
  94. class.o :    class.c defmacio.h
  95.  
  96. template.o :    template.c defmacio.h
  97.  
  98. exceptio.o :    exceptio.c macro.h defmacio.h
  99.  
  100. generate.o :    generate.c macro.h defmacio.h
  101.  
  102. compress.o :    compress.c defmacio.h
  103.