home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume28 / mrandom-3.0 / part01 / src / makefile < prev    next >
Encoding:
Makefile  |  1994-05-06  |  2.0 KB  |  83 lines

  1. # makefile 3.1 5/28/93
  2.  
  3. # HOST should be the name of your machine
  4. HOST = SunSS1p
  5.  
  6. # CC should be the name of your favorite C compiler
  7. CC = gcc
  8.  
  9. # set your compiler flag(s) here
  10. CBFLAG1 = -O2
  11. CBFLAG2 =
  12. CBFLAG3 =
  13. # the following compiler flags go at the end of the command line; use for
  14. # flags that are required by the compiler to be at the end of the line
  15. CEFLAG1 = -lm
  16. CEFLAG2 = 
  17.  
  18. # you shouldn't have to change anything below this line
  19. CBFLAGS = ${CBFLAG1} ${CBFLAG2} ${CBFLAG3}
  20. CEFLAGS = ${CEFLAG1} ${CEFLAG2}
  21.  
  22. # where the results of the test script will be written
  23. RESULTFILE = results.${HOST}.${CC}${CBFLAG1}${CBFLAG2}${CBFLAG3}${CEFLAG1}${CEFLAG2}
  24.  
  25. # a standard resultfile
  26. RESULTSTD = results.SunSS1p.gcc.O2-lm.orig
  27.  
  28. INCS =  mrandom.h bentley.h pcrand.h ran0.h ran1.h ran2.h ultra.h xsq.h
  29.  
  30. SRCS = mrtest.c mrandom.c bentley.c pcrand.c ran0.c ran1.c ran2.c\
  31.     ultra.c xsq.c
  32.  
  33. OBJS = mrandom.o bentley.o pcrand.o ran0.o ran1.o ran2.o ultra.o xsq.o
  34.  
  35. all:
  36.     make mrandom.a
  37.     make mrtest
  38.  
  39. mrandom.a: ${OBJS}
  40.     ar r mrandom.a ${OBJS}
  41.     ranlib mrandom.a
  42.     chmod a+rwx mrandom.a
  43.  
  44. mrtest    : mrtest.c mrandom.a
  45.     ${CC} ${CBFLAGS} mrtest.c -o mrtest mrandom.a ${CEFLAGS}
  46.  
  47. mrtestv    : mrandom.a mrtest.c
  48.     ${CC} ${CBFLAGS} -DVECTOR mrtest.c -o mrtestv mrandom.a \
  49.       ${CEFLAGS}
  50.  
  51. mrtestv.s: ${OBJS} mrtest.c
  52.     ${CC} ${CBFLAGS} -S -DVECTOR mrtest.c \
  53.       -o mrtestv.s mrandom.a ${CEFLAGS}
  54.  
  55. mrtestg    : ${OBJS} mrtest.c
  56.     ${CC} ${CFLAGS} -g mrtest.c \
  57.       -o mrtestg mrandom.a ${CEFLAGS}
  58.  
  59. test    :
  60. # force recompilation, just in case CFLAGS or CC have changed.
  61.     /bin/rm -f ${OBJS} mrandom.a
  62. # The following command should take a few minutes...
  63.     ./script > ${RESULTFILE}
  64. #
  65. # Since mrtest's output should be machine- and compiler independent,
  66. # the following diff should show only differences in timing and
  67. # in compiler invocation lines.  If you see anything else, please
  68. # contact cthombor@mars.d.umn.edu.
  69.     -diff ${RESULTFILE} ${RESULTSTD}
  70. #
  71. # End of test.
  72.  
  73. clean    :
  74.     rm -f *.o *.s
  75.     rm -f mrtest mrtestv mrtestg mrtestv.s mrandom.a
  76.     rm -f ${RESULTFILE} RNGstatefile
  77.  
  78. realclean    :
  79.     make clean
  80.     rm -f mrtest mrandom.a
  81.  
  82.