| 1 | PROGRAM = $(BINDIR)/$(BENCHMARK).$(CLASS).x
|
|---|
| 2 | FCOMPILE = $(F77) -c $(F_INC) $(FFLAGS)
|
|---|
| 3 | CCOMPILE = $(CC) -c $(C_INC) $(CFLAGS)
|
|---|
| 4 |
|
|---|
| 5 | # Class "U" is used internally by the setparams program to mean
|
|---|
| 6 | # "unknown". This means that if you don't specify CLASS=
|
|---|
| 7 | # on the command line, you'll get an error. It would be nice
|
|---|
| 8 | # to be able to avoid this, but we'd have to get information
|
|---|
| 9 | # from the setparams back to the make program, which isn't easy.
|
|---|
| 10 | CLASS=U
|
|---|
| 11 |
|
|---|
| 12 | default:: ${PROGRAM}
|
|---|
| 13 |
|
|---|
| 14 | # This makes sure the configuration utility setparams
|
|---|
| 15 | # is up to date.
|
|---|
| 16 | # Note that this must be run every time, which is why the
|
|---|
| 17 | # target does not exist and is not created.
|
|---|
| 18 | # If you create a file called "config" you will break things.
|
|---|
| 19 | config:
|
|---|
| 20 | @cd ../sys; ${MAKE} all
|
|---|
| 21 | ../sys/setparams ${BENCHMARK} ${CLASS}
|
|---|
| 22 |
|
|---|
| 23 | COMMON=../common
|
|---|
| 24 | ${COMMON}/${RAND}.o: ${COMMON}/${RAND}.f ../config/make.def
|
|---|
| 25 | cd ${COMMON}; ${FCOMPILE} ${RAND}.f
|
|---|
| 26 |
|
|---|
| 27 | ${COMMON}/print_results.o: ${COMMON}/print_results.f ../config/make.def
|
|---|
| 28 | cd ${COMMON}; ${FCOMPILE} print_results.f
|
|---|
| 29 |
|
|---|
| 30 | ${COMMON}/c_print_results.o: ${COMMON}/c_print_results.c ../config/make.def
|
|---|
| 31 | cd ${COMMON}; ${CCOMPILE} c_print_results.c
|
|---|
| 32 |
|
|---|
| 33 | ${COMMON}/timers.o: ${COMMON}/timers.f ../config/make.def
|
|---|
| 34 | cd ${COMMON}; ${FCOMPILE} timers.f
|
|---|
| 35 |
|
|---|
| 36 | ${COMMON}/c_timers.o: ${COMMON}/c_timers.c ../config/make.def
|
|---|
| 37 | cd ${COMMON}; ${CCOMPILE} c_timers.c
|
|---|
| 38 |
|
|---|
| 39 | ${COMMON}/wtime.o: ${COMMON}/${WTIME} ../config/make.def
|
|---|
| 40 | cd ${COMMON}; ${CCOMPILE} ${MACHINE} -o wtime.o ${COMMON}/${WTIME}
|
|---|
| 41 | # For most machines or CRAY or IBM
|
|---|
| 42 | # cd ${COMMON}; ${CCOMPILE} ${MACHINE} ${COMMON}/wtime.c
|
|---|
| 43 | # For a precise timer on an SGI Power Challenge, try:
|
|---|
| 44 | # cd ${COMMON}; ${CCOMPILE} -o wtime.o ${COMMON}/wtime_sgi64.c
|
|---|
| 45 |
|
|---|
| 46 | ${COMMON}/c_wtime.o: ${COMMON}/${WTIME} ../config/make.def
|
|---|
| 47 | cd ${COMMON}; ${CCOMPILE} -o c_wtime.o ${COMMON}/${WTIME}
|
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 | # Normally setparams updates npbparams.h only if the settings (CLASS)
|
|---|
| 51 | # have changed. However, we also want to update if the compile options
|
|---|
| 52 | # may have changed (set in ../config/make.def).
|
|---|
| 53 | npbparams.h: ../config/make.def
|
|---|
| 54 | @ echo make.def modified. Rebuilding npbparams.h just in case
|
|---|
| 55 | rm -f npbparams.h
|
|---|
| 56 | ../sys/setparams ${BENCHMARK} ${CLASS}
|
|---|
| 57 |
|
|---|
| 58 | # So that "make benchmark-name" works
|
|---|
| 59 | ${BENCHMARK}: default
|
|---|
| 60 | ${BENCHMARKU}: default
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|