Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / examples / smpi / NAS / sys / make.common
1 PROGRAM  = $(BINDIR)/$(BENCHMARK).$(CLASS).$(NPROCS)
2 FCOMPILE = $(MPIF77) -c $(FMPI_INC) $(FFLAGS)
3 CCOMPILE = $(MPICC)  -c $(CMPI_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 NPROCS=1
12
13 default:: ${PROGRAM}
14
15 # This makes sure the configuration utility setparams 
16 # is up to date. 
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. 
20 config:
21         @cd ../sys; ${MAKE} all
22         ../sys/setparams ${BENCHMARK} ${NPROCS} ${CLASS} ${SUBTYPE}
23
24 COMMON=../common
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
29
30 ${COMMON}/print_results.o: ${COMMON}/print_results.f
31         cd ${COMMON}; ${FCOMPILE} print_results.f
32
33 ${COMMON}/c_print_results.o: ${COMMON}/c_print_results.c
34         cd ${COMMON}; ${CCOMPILE} c_print_results.c
35
36 ${COMMON}/timers.o: ${COMMON}/timers.f
37         cd ${COMMON}; ${FCOMPILE} timers.f
38
39 ${COMMON}/c_timers.o: ${COMMON}/c_timers.c
40         cd ${COMMON}; ${CCOMPILE} c_timers.c
41
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
47         rm -f npbparams.h
48         ../sys/setparams ${BENCHMARK} ${NPROCS} ${CLASS} ${SUBTYPE}
49
50 # So that "make benchmark-name" works
51 ${BENCHMARK}:  default
52 ${BENCHMARKU}: default
53
54