home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / benchmar / dhrys / makefile < prev    next >
Encoding:
Makefile  |  1994-06-05  |  4.0 KB  |  147 lines

  1. #
  2. #    Adjust for your system!
  3. #
  4. #    Common options for generic UNIX and Microsoft C (under DOS)
  5. #    are listed here.  You can change them by switching the order,
  6. #    placing the ones you want last.  Pay particular attention to
  7. #    the HZ parameter, which may or may not be listed in some
  8. #    header file on your system, such as <sys/param.h> or <limits.h>
  9. #    (as CLK_TCK).  Even if it is listed, it may be incorrect.
  10. #    Also, some operating systems (notably some (all?) versions
  11. #    of Microport UNIX) lie about the time.  Sanity check with a
  12. #    stopwatch.
  13. #
  14. #    For Microsoft C under DOS, you need a real make, not MSC make,
  15. #    to run this Makefile.  The public domain "ndmake" will suffice.
  16. #
  17. CC=        cl            # C compiler name goes here (MSC)
  18. CC=        cc            # C compiler name goes here (UNIX)
  19.  
  20. PROGS=        msc            # Programs to build (MSC)
  21. PROGS=        unix            # Programs to build (UNIX)
  22.  
  23. TIME_FUNC=    -DMSC_CLOCK        # Use Microsoft clock() for measurement
  24. TIME_FUNC=    -DTIME            # Use time(2) for measurement
  25. TIME_FUNC=    -DTIMES            # Use times(2) for measurement
  26. HZ=        50            # Frequency of times(2) clock ticks
  27. HZ=        60            # Frequency of times(2) clock ticks
  28. HZ=        100            # Frequency of times(2) clock ticks
  29. HZ=        1            # Give bogus result unless changed!
  30.  
  31. STRUCTASSIGN=    -DNOSTRUCTASSIGN    # Compiler cannot assign structs
  32. STRUCTASSIGN=                # Compiler can assign structs
  33.  
  34. ENUMS=        -DNOENUMS        # Compiler doesn't have enum type
  35. ENUMS=                    # Compiler does have enum type
  36.  
  37. OPTIMIZE=    -Ox -G2            # Optimization Level (MSC, 80286)
  38. OPTIMIZE=    -O            # Optimization Level (generic UNIX)
  39.  
  40. LFLAGS=                    #Loader Flags
  41.  
  42. CFLAGS=    $(OPTIMIZE) $(TIME_FUNC) -DHZ=$(HZ) $(ENUMS) $(STRUCTASSIGN) $(CFL)
  43.  
  44. #
  45. #        You shouldn't need to touch the rest
  46. #
  47. SRC=        dhry_1.c dhry_2.c
  48. HDR=        dhry.h
  49.  
  50. UNIX_PROGS=    dry2 dry2reg
  51. MSC_PROGS=    sdry2.exe sdry2reg.exe mdry2.exe mdry2reg.exe \
  52.         ldry2.exe ldry2reg.exe cdry2.exe cdry2reg.exe \
  53.         hdry2.exe hdry2reg.exe
  54.  
  55. # Files added by rer:
  56. FILES1=        README.RER clarify.doc Makefile submit.frm pure2_1.dif \
  57.         dhry_c.dif
  58. # Reinhold's files:
  59. FILES2=        README RATIONALE $(HDR) $(SRC)
  60. FILES3=        dhry.p
  61.  
  62. all:    $(PROGS)
  63.  
  64. unix:    $(UNIX_PROGS)
  65.  
  66. msc:    $(MSC_PROGS)
  67.  
  68. dry2:        $(SRC) $(HDR)
  69.         $(CC) $(CFLAGS) $(SRC) $(LFLAGS) -o $@
  70.  
  71. dry2reg:    $(SRC) $(HDR)
  72.         $(CC) $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
  73.  
  74. sdry2.exe:    $(SRC) $(HDR)
  75.         $(CC) -AS $(CFLAGS) $(SRC) $(LFLAGS) -o $@
  76.  
  77. sdry2reg.exe:    $(SRC) $(HDR)
  78.         $(CC) -AS $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
  79.  
  80. mdry2.exe:    $(SRC) $(HDR)
  81.         $(CC) -AM $(CFLAGS) $(SRC) $(LFLAGS) -o $@
  82.  
  83. mdry2reg.exe:    $(SRC) $(HDR)
  84.         $(CC) -AM $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
  85.  
  86. ldry2.exe:    $(SRC) $(HDR)
  87.         $(CC) -AL $(CFLAGS) $(SRC) $(LFLAGS) -o $@
  88.  
  89. ldry2reg.exe:    $(SRC) $(HDR)
  90.         $(CC) -AL $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
  91.  
  92. cdry2.exe:    $(SRC) $(HDR)
  93.         $(CC) -AC $(CFLAGS) $(SRC) $(LFLAGS) -o $@
  94.  
  95. cdry2reg.exe:    $(SRC) $(HDR)
  96.         $(CC) -AC $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
  97.  
  98. hdry2.exe:    $(SRC) $(HDR)
  99.         $(CC) -AH $(CFLAGS) $(SRC) $(LFLAGS) -o $@
  100.  
  101. hdry2reg.exe:    $(SRC) $(HDR)
  102.         $(CC) -AH $(CFLAGS) -DREG=register $(SRC) $(LFLAGS) -o $@
  103.  
  104. shar:    dry2shar.1 dry2shar.2 dry2shar.3
  105.  
  106. dry2.arc:    $(FILES1) $(FILES2) $(FILES3)
  107.     arc a dry2.arc $(FILES1) $(FILES2) $(FILES3)
  108.  
  109. dry2shar.1: $(FILES1)
  110.     shar -vc -p X $(FILES1) >$@
  111.  
  112. dry2shar.2: $(FILES2)
  113.     shar -vc -p X $(FILES2) >$@
  114.  
  115. dry2shar.3: $(FILES3)
  116.     shar -v -p X $(FILES3) >$@
  117.  
  118. clean:
  119.     -rm -f *.o *.obj
  120.  
  121. clobber: clean
  122.     -rm -f $(UNIX_PROGS) $(MSC_PROGS) dry2shar.* dry2.arc
  123.  
  124. post:    dry2shar.1    dry2shar.2    dry2shar.3
  125.     for i in 1 2 3;\
  126.     do\
  127.         cat HEADERS BOILER.$$i dry2shar.$$i |\
  128.         inews -h -t "Dhrystone 2.1 ($$i of 3)" -n comp.arch;\
  129.     done
  130.  
  131. repost:    dry2shar.1    dry2shar.2    dry2shar.3
  132.     for i in 3;\
  133.     do\
  134.         cat HEADERS BOILER.$$i dry2shar.$$i |\
  135.         inews -h -t "REPOST: Dhrystone 2.1 ($$i of 3)" -n comp.arch;\
  136.     done
  137.  
  138. mail:    dry2shar.1    dry2shar.2    dry2shar.3
  139.     for i in 1 2 3;\
  140.     do\
  141.         cat BOILER.$$i dry2shar.$$i |\
  142.         mailx -s "Dhrystone 2.1 ($$i of 3)" $(ADDR);\
  143.     done
  144.  
  145. dos:
  146.     doscopy -a $(FILES1) $(FILES2) $(FILES3) dos!a:
  147.