home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1989 …il & Dave's Excellent CD / Excellent CD HFS.raw / Moof / Goodies / DTS Goodies / Obfuscated_C / 1988 / Makefile < prev    next >
Encoding:
Makefile  |  1989-04-13  |  2.5 KB  |  81 lines  |  [TEXT/MPS ]

  1. # %W% %G% %U%
  2. #
  3. # 1988 makefile
  4.  
  5. SHELL=/bin/sh
  6. CFLAGS=-O
  7. CC=cc
  8. CPP=/lib/cpp
  9. # you may need a version of cpp that is faster and/or allows more symbols
  10. # than the standard cpp.  If so, adjust the BIG_CPP below.
  11. #
  12. # If you have the GNU cpp, you should use it below as it is MUCH faster
  13. # than the standard cpp and does not have problems with memory usage.
  14. # However you should note that the non-ANSI nature of defining symbols
  15. # that start with '#' prevents GNU cpp from doing the initial pass.  
  16. # Thus you should not use the GNU cpp for the ${CPP} symbol.
  17. BIG_CPP=${CPP}
  18.  
  19. WINNERS=dale phillipps robison westley reddy isaak \
  20.     litmaath spinellis zsmall
  21.  
  22. all: ${WINNERS}
  23.  
  24. dale: dale.c
  25.     ${CC} ${CFLAGS} $? -o $@
  26. phillipps: phillipps.c
  27.     ${CC} ${CFLAGS} $? -o $@
  28. robison: robison.c
  29.     ${CC} ${CFLAGS} $? -o $@
  30. westley: westley.c
  31.     ${CC} ${CFLAGS} $? -o $@
  32. reddy: reddy.c
  33.     ${CC} ${CFLAGS} $? -o $@
  34. isaak: isaak.c
  35.     ${CC} ${CFLAGS} -DI=B -DO=- -Dy $? -o $@
  36. litmaath: litmaath.c
  37.     ${CC} ${CFLAGS} $? -o $@
  38. spinellis: spinellis.c spinellis.data
  39.     @echo This program can not be portably compiled with a makefile
  40.     @echo because it reads from /dev/tty.
  41.     @echo Compile this program with: cc spinellis.c -o spinellis
  42.     @echo and type the following text followed by an EOF '(^D)'.
  43.     @cat spinellis.data
  44.     @-if [ ! -f spinellis ]; then \
  45.         touch spinellis; \
  46.     fi
  47.  
  48. # not an official entry
  49. #
  50. # The 'zsmall.c' program was obtained from 'applin.c' by reducing its recursion
  51. # and running it thru the initial /lib/cpp.  That is, 'zsmall.c' is a small
  52. # version of the 'z.c' file as produced by the 'applin' make rule below.
  53. zsmall: zsmall.c
  54.     @echo this reduced version of applin.c can take some time to compile...
  55.     ${CC} ${CFLAGS} zsmall.c -o $@
  56.  
  57. # This entry took 75 minutes to compile on a Amdahl 5980-300E
  58. # (a 55658 Dhyrstone/sec/cpu machine) using the System V cpp.
  59. # (The GNU cpp when defined as BIG_CPP took only 45 seconds)
  60. # Your cpp may not be able to compile it due to a common bug
  61. # that results in ${CPP} running out of space.  The routine
  62. # 'zsmall' is a smaller version of the applin.c entry.
  63. applin: applin.c
  64.     ${CPP} '-DM=#include "z.c"' '-DR=#include' '-DF=#if' \
  65.         '-DI=#ifdef' '-DL=#else' '-DE=#endif' '-DN=#ifndef' \
  66.         '-DD=#define' '-DU=#undef' applin.c z.c
  67.     @echo this is going to take a very very long time to C-preprocess
  68.     @echo perhaps you should do:  make zsmall   instead
  69.     ${BIG_CPP} z.c > large.c
  70.     @echo now for the real compile...
  71.     ${CC} ${CFLAGS} large.c -o $@
  72.  
  73. clean:
  74.     rm -f core *.o
  75. clobber: clean
  76.     rm -f ${WINNERS} applin
  77. nuke: clobber
  78.     rm -f large.c z.c
  79. install: all
  80.     cat ${WINNERS} > /dev/null
  81.