1 PROGRAM = $(BINDIR)/$(BENCHMARK).$(CLASS).$(NPROCS)
2 FCOMPILE = $(MPIF77) -c $(FMPI_INC) $(FFLAGS)
3 CCOMPILE = $(MPICC) -c $(CMPI_INC) $(CFLAGS)
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.
15 # This makes sure the configuration utility setparams
17 # Note that this must be run every time, which is why the
18 # target does not exist and is not created.
19 # If you create a file called "config" you will break things.
21 @cd ../sys; ${MAKE} all
22 ../sys/setparams ${BENCHMARK} ${NPROCS} ${CLASS} ${SUBTYPE}
25 ${COMMON}/${RAND}.o: ${COMMON}/${RAND}.f
26 cd ${COMMON}; ${FCOMPILE} ${RAND}.f
27 ${COMMON}/c_randdp.o: ${COMMON}/randdp.c
28 cd ${COMMON}; ${CCOMPILE} -o c_randdp.o randdp.c
30 ${COMMON}/print_results.o: ${COMMON}/print_results.f
31 cd ${COMMON}; ${FCOMPILE} print_results.f
33 ${COMMON}/c_print_results.o: ${COMMON}/c_print_results.c
34 cd ${COMMON}; ${CCOMPILE} c_print_results.c
36 ${COMMON}/timers.o: ${COMMON}/timers.f
37 cd ${COMMON}; ${FCOMPILE} timers.f
39 ${COMMON}/c_timers.o: ${COMMON}/c_timers.c
40 cd ${COMMON}; ${CCOMPILE} c_timers.c
42 # Normally setparams updates npbparams.h only if the settings (CLASS/NPROCS)
43 # have changed. However, we also want to update if the compile options
44 # may have changed (set in ../config/make.def).
45 npbparams.h: ../config/make.def
46 @ echo make.def modified. Rebuilding npbparams.h just in case
48 ../sys/setparams ${BENCHMARK} ${NPROCS} ${CLASS} ${SUBTYPE}
50 # So that "make benchmark-name" works
52 ${BENCHMARKU}: default