home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / cpp.lha / Makefile < prev    next >
Makefile  |  1991-10-12  |  4KB  |  165 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. # 29-Jul-91 PB: Adapted to AmigaDOS and SAS/C 5.10a
  14. #
  15.  
  16. # The architecture flags allow you to specify optimizations for the processor
  17. # type you want.  Uncomment the one you have, or leave all commented if you
  18. # want a generic sed that can run on any processor.
  19. #
  20. # NOTE: Make sure TARGET_ARCH and ARCH_OPTIMIZE is in sync!
  21. #
  22. # Target architecture
  23. #TARGET_ARCH = MC68000
  24. #TARGET_ARCH = MC68010
  25. #TARGET_ARCH = MC68020
  26. TARGET_ARCH = MC68030
  27. #TARGET_ARCH = MC68040
  28. #
  29. # Architecture flags
  30. #ARCH_OPTIMIZE = -m0
  31. #ARCH_OPTIMIZE = -m1
  32. #ARCH_OPTIMIZE = -m2
  33. ARCH_OPTIMIZE = -m3
  34. #ARCH_OPTIMIZE = -m4
  35.  
  36. # Turn on optimizer
  37. OPTIMIZE = -O
  38.  
  39. # Debugging
  40. # DEBUGFLAGS = -d5
  41.  
  42. # Compiler driver
  43. CC = lc
  44.  
  45. # C preprocessor
  46. CPP = cpp -D__SASC
  47.  
  48. # Generic compiler flags
  49. CFLAGS = $(DEBUGFLAGS) -d$(TARGET_ARCH) $(ARCH_OPTIMIZE)
  50.  
  51. # Linker
  52. LD = blink
  53.  
  54. # Linker flags
  55. LDFLAGS = SC SD ND VERBOSE
  56.  
  57. # Linker libraries
  58.  
  59. # If you don't have the butility.lib link library then just comment the
  60. # following line out.
  61. #
  62. BUTILITY = LIB:local/butility.lib
  63. LIBS = $(BUTILITY) LIB:lc.lib LIB:amiga.lib
  64.  
  65. # Startup modules (residentability option)
  66. STARTUP = LIB:cres.o
  67.  
  68. #
  69. # For a cpp without defmacro extensions use the following definitions.
  70. #
  71. #CPPFLAGS =
  72. #SRCS = cpp1.c cpp2.c cpp3.c cpp4.c cpp5.c cpp6.c
  73.  
  74. CPPFLAGS = -dCOOL
  75.  
  76. .SUFFIXES: .c .o
  77. #.c.o:
  78. #        $(CC) $(CPPFLAGS) $(CFLAGS) $*.c
  79. .c.o:
  80.         $(CC) $(CPPFLAGS) $(OPTIMIZE) $(CFLAGS) $*.c
  81.  
  82. SRCS = cpp1.c cpp2.c cpp3.c cpp4.c cpp5.c cpp6.c cpp7.c \
  83.        defmacio.c hash.c defpackage.c parmtype.c macro.c \
  84.        member.c class.c template.c exception.c typecase.c generate.c compress.c
  85. OBJS = cpp1.o cpp2.o cpp3.o cpp4.o cpp5.o cpp6.o cpp7.o \
  86.        defmacio.o hash.o defpackage.o parmtype.o macro.o \
  87.        member.o class.o template.o exception.o typecase.o generate.o compress.o
  88.  
  89. #
  90. # ** compile cpp
  91. #
  92.  
  93. cpp: $(OBJS)
  94.         blink <WITH <(T:CPP.link)
  95.         FROM $(STARTUP) $(OBJS)
  96.         LIB $(LIBS)
  97.         TO cpp
  98.         $(LDFLAGS)
  99. <
  100.  
  101. #
  102. # ** Remove unneeded files
  103. #
  104.  
  105. clean:
  106.         delete *.o cpp
  107.  
  108. #
  109. # ** Test cpp by preprocessing itself, compiling the result,
  110. # ** repeating the process and diff'ing the result.  Note: this
  111. # ** is not a good test of cpp, but a simple verification.
  112. # ** The diff's should not report any changes.
  113. #
  114.  
  115. #test:
  116. #        for FILE in $(SRCS) ; do ./cpp $(CPPFLAGS) $$FILE > t_$$FILE ; done
  117. #        $(CC) $(CPPFLAGS) $(CFLAGS) t_*.c
  118. #        for FILE in $(SRCS) ; do ./a.out $(CPPFLAGS) $$FILE > tt_$$FILE ; done
  119. #        for FILE in $(SRCS) ; do diff t_$$FILE  tt_$$FILE ; done
  120. #        rm t_* tt_* a.out
  121.  
  122. #
  123. # Object module dependencies
  124. #
  125.  
  126. cpp1.o  :       cpp1.c cpp.h cppdef.h
  127.  
  128. cpp2.o  :       cpp2.c cpp.h cppdef.h
  129.  
  130. cpp3.o  :       cpp3.c cpp.h cppdef.h
  131.  
  132. cpp4.o  :       cpp4.c cpp.h cppdef.h
  133.  
  134. cpp5.o  :       cpp5.c cpp.h cppdef.h
  135.  
  136. cpp6.o  :       cpp6.c cpp.h cppdef.h
  137.  
  138. cpp7.o  :       cpp7.c cpp.h cppdef.h
  139.  
  140. defmacio.o :    defmacio.c defmacio.h
  141.  
  142. parmtype.o :    parmtype.c defmacio.h
  143.  
  144. macro.o :       macro.c macro.h defmacio.h
  145.  
  146. defpackage.o :  defpackage.c defmacio.h
  147.  
  148. hash.o :        hash.c
  149.  
  150. issame.o :      issame.c defmacio.h
  151.  
  152. member.o :      member.c defmacio.h
  153.  
  154. class.o :       class.c defmacio.h
  155.  
  156. template.o :    template.c defmacio.h
  157.  
  158. exception.o :   exception.c macro.h defmacio.h
  159.  
  160. typecase.o :    typecase.c macro.h defmacio.h
  161.  
  162. generate.o :    generate.c macro.h defmacio.h
  163.  
  164. compress.o :    compress.c defmacio.h
  165.