|
| 1 | +include make.settings |
| 2 | + |
| 3 | +## Set ADIOS_DIR here or before doing make |
| 4 | +override ADIOS_FINC=-I${ADIOS_DIR}/include |
| 5 | +override ADIOS_FLIB=`${ADIOS_DIR}/bin/adios_config -l -f` |
1 | 6 |
|
2 | 7 | default:
|
3 |
| - @echo "Make targets at this level are for cleaning only:" |
4 |
| - @echo " clean-code : recursively delete objects and binaries" |
5 |
| - @echo " clean-data : recursively delete files created by the examples" |
6 |
| - @echo " distclean : clean-code and clean-data" |
| 8 | + @echo "Make targets: fort hdf5 phdf5 adios1 adios2 noxml" |
| 9 | + @echo " fort: build example with text output(io_fort.F90)" |
| 10 | + @echo " hdf5_a: build example with HDF5, separate timesteps (io_hdf5_a.F90)" |
| 11 | + @echo " hdf5_b: build example with HDF5, combined timesteps (io_hdf5_b.F90)" |
| 12 | + @echo " phdf5: build example with Parallel HDF5 (io_phdf5.F90)" |
| 13 | + @echo " adios1: build example with ADIOS (io_adios_gpp.F90)" |
| 14 | + @echo " adios2: build example with ADIOS (io_adios.F90)" |
| 15 | + @echo " noxml: build example with ADIOS (io_adios_noxml.F90)" |
7 | 16 |
|
8 | 17 | all: default
|
9 | 18 | help: default
|
10 | 19 |
|
11 |
| -subdirs = simulation analysis stage_write |
12 | 20 |
|
13 |
| -clean-data: |
14 |
| - rm -f *.o *.mod *.fh core.* |
15 |
| - rm -f fort.* |
16 |
| - rm -f *.png minmax |
17 |
| - rm -rf *.bp *.bp.dir *.idx |
18 |
| - rm -f *.h5 |
19 |
| - rm -f conf *.sst *.insitumpi |
20 |
| - for dir in $(subdirs); do echo "Clean $${dir}"; (cd $${dir}; make clean-data); done |
| 21 | +io_hdf5_a.o : io_hdf5_a.F90 |
| 22 | + ${FC} ${FFLAGS} -c ${HDF5_FINC} $< |
| 23 | + |
| 24 | +io_hdf5_b.o : io_hdf5_b.F90 |
| 25 | + ${FC} ${FFLAGS} -c ${HDF5_FINC} $< |
| 26 | + |
| 27 | +io_phdf5.o : io_phdf5.F90 |
| 28 | + ${FC} ${FFLAGS} -c ${PHDF5_FINC} $< |
| 29 | + |
| 30 | +gwrite_heat.fh: heat_transfer.xml |
| 31 | + ${ADIOS_DIR}/bin/gpp.py heat_transfer.xml |
| 32 | + rm -f gread_heat.fh |
| 33 | + |
| 34 | +io_adios_gpp.o : gwrite_heat.fh io_adios_gpp.F90 |
| 35 | + ${FC} ${FFLAGS} -c ${ADIOS_FINC} io_adios_gpp.F90 |
| 36 | + |
| 37 | +io_adios.o : io_adios.F90 |
| 38 | + ${FC} ${FFLAGS} -c ${ADIOS_FINC} $< |
| 39 | + |
| 40 | +io_adios_noxml.o : io_adios_noxml.F90 |
| 41 | + ${FC} ${FFLAGS} -c ${ADIOS_FINC} $< |
| 42 | + |
| 43 | +%.o : %.F90 |
| 44 | + ${FC} ${FFLAGS} -c $< |
21 | 45 |
|
22 |
| -clean-code: |
| 46 | +fort: heat_vars.o io_fort.o heat_transfer.o |
| 47 | + ${FC} ${FFLAGS} -o heat_transfer_fort $^ |
| 48 | + |
| 49 | +hdf5_a: heat_vars.o io_hdf5_a.o heat_transfer.o |
| 50 | + libtool --mode=link --tag=FC ${FC} ${FFLAGS} -o heat_transfer_hdf5_a $^ ${HDF5_FLIB} |
| 51 | + |
| 52 | +hdf5_b: heat_vars.o io_hdf5_b.o heat_transfer.o |
| 53 | + libtool --mode=link --tag=FC ${FC} ${FFLAGS} -o heat_transfer_hdf5_b $^ ${HDF5_FLIB} |
| 54 | + |
| 55 | +phdf5: heat_vars.o io_phdf5.o heat_transfer.o |
| 56 | + libtool --mode=link --tag=FC ${FC} ${FFLAGS} -o heat_transfer_phdf5 $^ ${PHDF5_FLIB} |
| 57 | + |
| 58 | +adios1: heat_vars.o io_adios_gpp.o heat_transfer.o |
| 59 | + ${FC} ${FFLAGS} -o heat_transfer_adios1 $^ ${ADIOS_FLIB} |
| 60 | + |
| 61 | +adios2: heat_vars.o io_adios.o heat_transfer.o |
| 62 | + ${FC} ${FFLAGS} -o heat_transfer_adios2 $^ ${ADIOS_FLIB} |
| 63 | + |
| 64 | +noxml: heat_vars.o io_adios_noxml.o heat_transfer.o |
| 65 | + ${FC} ${FFLAGS} -o heat_transfer_noxml $^ ${ADIOS_FLIB} |
| 66 | + |
| 67 | +clean: |
23 | 68 | rm -f *.o *.mod *.fh core.*
|
24 | 69 | rm -f heat_transfer_fort
|
25 |
| - rm -f heat_transfer_adios1 heat_transfer_adios1_gpp heat_transfer_adios1_noxml |
26 |
| - rm -f heat_transfer_adios2 heat_transfer_noxml |
| 70 | + rm -f heat_transfer_adios1 heat_transfer_adios2 heat_transfer_noxml |
27 | 71 | rm -f heat_transfer_hdf5_a heat_transfer_hdf5_b heat_transfer_phdf5
|
28 |
| - for dir in $(subdirs); do echo "Clean $${dir}"; (cd $${dir}; make clean-code); done |
29 |
| - |
30 |
| -distclean: clean-code clean-data |
31 |
| - |
32 | 72 |
|
| 73 | +distclean: clean |
| 74 | + rm -f fort.* |
| 75 | + rm -f *.png minmax |
| 76 | + rm -rf *.bp *.bp.dir *.idx |
| 77 | + rm -f *.h5 |
| 78 | + rm -f conf |
33 | 79 |
|
34 | 80 |
|
35 | 81 |
|
0 commit comments