dns-hit3d-fdm/Makefile
2017-09-27 04:25:44 +09:00

77 lines
1.4 KiB
Makefile

# Makefile with logic in it. For different hosts runs different things
# Define the correct flags and compilers
MPIF90 = blah
FFTW_HOME = ../libs/fftw
MPIF90 = mpif90
FCFLAGS = -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 -c $(MPI_COMPILE_FLAGS) -I$(FFTW_HOME)/include
LDFLAGS = -fdefault-double-8 -fdefault-integer-8 -fdefault-real-8 $(MPI_LD_FLAGS) -L$(FFTW_HOME)/lib -lfftw3 -lm
FCFLAGS_F77 =
MODULES += m_openmpi.o
# Program name
PROG = hit3d.x
# Modules
MODULES += \
m_io.o\
m_parameters.o\
m_work.o\
m_fields.o\
m_timing.o\
x_fftw.o\
m_filter_xfftw.o\
m_particles.o\
m_stats.o\
m_force.o\
m_rand_knuth.o\
m_les.o\
RANDu.o\
m_hit_result.o\
m_compact.o\
m_fdm_calc.o
# Objects
OBJ = main.o\
begin_new.o\
begin_restart.o\
dealias_all.o\
get_file_ext.o\
init_velocity.o\
init_scalars.o\
io_write_4.o\
my_dt.o\
my_exit.o\
pressure.o\
restart_io.o\
rhs_velocity.o\
rhs_scalars.o\
velocity_rescale.o\
write_tmp4.o\
gather_tmp4.o\
gather_4.o\
write_stats.o
# -------------------------------------------------------
# link
$(PROG): $(MODULES) $(OBJ)
$(MPIF90) $(MODULES) $(OBJ) -o $(PROG) $(LDFLAGS)
# -------------------------------------------------------
# compile
$(OBJ): $(MODULES)
%.o: %.f
$(MPIF90) $(FCFLAGS) $(FCFLAGS_F77) $<
%.o: %.f90
$(MPIF90) $(FCFLAGS) $<
clean:
rm -f *.o *.mod $(PROG)