home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_DEV08B.LHA / gerlib / libg++ / etc / benchmarks / Makefile.in < prev   
Encoding:
Makefile  |  1993-12-12  |  1.9 KB  |  73 lines

  1. # A makefile for the stuff now in libg++/etc/benchmarks
  2.  
  3. srcdir = .
  4.  
  5. prefix = /usr/local
  6.  
  7.  
  8. # select QUICK= -DQUICK to get 50000 instead of 500000 iterations
  9. QUICK= -DQUICK
  10. #QUICK=
  11.  
  12. # call-var virt-var left out, because gcc passes -fthis-is-variable
  13. # to collect, which tried to pass it to gcc/cc1.
  14. TEST_PROGS=  builtin class virt no_nrv byval call convert # call-var virt-var
  15.  
  16. #### package, host, target, and site dependent Makefile fragments come in here.
  17. ##
  18.  
  19. $(TEST_PROGS) : Int.h Char.h dhrystone.cc
  20. test_progs: $(TEST_PROGS)
  21.  
  22. C_FLAGS = $(CXXFLAGS) $(CXXINCLUDES) $(QUICK)
  23.  
  24. check: $(TEST_PROGS)
  25.     @echo "dhrystone with builtin int and char types:"
  26.     @./builtin
  27.     @echo "Using classes Int and Char:"
  28.     @./class
  29.     @echo "Without mixed mode operators (forcing coercions):"
  30.     @./convert
  31. #    @echo "Using by-value, rather than by-reference calling conventions:"
  32. #    @./byval
  33.     @echo "Without using named return values:"
  34.     @./no_nrv
  35.     @echo "Using calls instead of inline functions:"
  36.     @./call
  37. #    @echo "Using calls, with -fthis-is-variable:"
  38. #    @./call-var
  39.     @echo "With all member functions virtual (non-inline):"
  40.     @./virt
  41.     @echo "With all member functions virtual, and -fthis-is-variable:"
  42. #    @./virt-var
  43. #    @echo "(Try other permutations/switches -- See Int.h.)"
  44.  
  45. run_tests: check
  46.  
  47. builtin:
  48.     $(CXX) $(C_FLAGS) -DBUILTIN $(srcdir)/dhrystone.cc $(LIBS) -o $@
  49.  
  50. class:
  51.     $(CXX) $(C_FLAGS) $(srcdir)/dhrystone.cc $(LIBS) -o $@
  52.  
  53. call:
  54.     $(CXX) $(C_FLAGS) -DCALL $(srcdir)/dhrystone.cc $(LIBS) -o $@
  55.  
  56. call-var:
  57.     $(CXX) $(C_FLAGS) -fthis-is-variable -DCALL $(srcdir)/dhrystone.cc $(LIBS) -o $@
  58.  
  59. convert:
  60.     $(CXX) $(C_FLAGS) -DCONVERT $(srcdir)/dhrystone.cc $(LIBS) -o $@
  61.  
  62. no_nrv:
  63.     $(CXX) $(C_FLAGS) -DNO_NRV $(srcdir)/dhrystone.cc $(LIBS) -o $@
  64.  
  65. byval:
  66.     $(CXX) $(C_FLAGS) -DBYVAL $(srcdir)/dhrystone.cc $(LIBS) -o $@
  67.  
  68. virt:
  69.     $(CXX) $(C_FLAGS) -DVIRT $(srcdir)/dhrystone.cc $(LIBS) -o $@
  70.  
  71. virt-var:
  72.     $(CXX) $(C_FLAGS) -fthis-is-variable -DVIRT $(srcdir)/dhrystone.cc $(LIBS) -o $@
  73.