# # Makefile for the MsSpec-DFM epsilon.f90 program # # by S. Tricot and D. Sébilleau # # Last version: 21 Apr 2021 # # Compiler # FC=gfortran # # Compile flags # #FFLAGS= FFLAGS=-g -fbounds-check -fbacktrace -ffpe-trap=zero,overflow,underflow,invalid,denormal #FFLAGS=-ffast-math -O3 # # Link flags # LDFLAGS= LDLIBS= # # Executable name # EXE=eps # # Building directory # BUILDDIR:=build2 .PHONY: clean cmn_DEPS:=DFM_library/ACCURACY_LIBRARY/accuracy.f90 \ DFM_library/INPUT_OUTPUT_LIBRARY/input_values.f90 \ DFM_library/DIMENSIONS_LIBRARY/dimensions.f90 \ DFM_library/UTILITIES_LIBRARY/simple_numbers.f90 \ DFM_library/UTILITIES_LIBRARY/powers_of_ten.f90 \ DFM_library/UTILITIES_LIBRARY/mathematical_constants.f90 \ DFM_library/UTILITIES_LIBRARY/physical_constants.f90 \ DFM_library/UTILITIES_LIBRARY/factorials.f90 \ DFM_library/ERROR_HANDLING_LIBRARY/error_caltech.f90 \ DFM_library/PRINT_LIBRARY/printfiles.f90 \ DFM_library/STRUCTURE_FACTOR_LIBRARY/utic_values.f90 \ DFM_library/DAMPING_LIBRARY/external_damping.f90 \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/Fermi_values.f90 cmn_OBJS:=$(patsubst %.f90,%.o, $(cmn_DEPS)) tool_SRCS:=$(cmn_DEPS) \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/external_functions.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/Lindhard_function.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/gamma.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/digamma.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/2F1_real.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/mod_mlf_garrappa.f90 \ DFM_library/UTILITIES_LIBRARY/derivation.f90 \ DFM_library/UTILITIES_LIBRARY/smoothing.f90 \ DFM_library/UTILITIES_LIBRARY/interpolation.f90 \ DFM_library/UTILITIES_LIBRARY/integration.f90 \ DFM_library/UTILITIES_LIBRARY/integration4.f90 \ DFM_library/UTILITIES_LIBRARY/transforms.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/basic_functions.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/bessel.f90 util_SRCS:=$(cmn_DEPS) \ DFM_library/UTILITIES_LIBRARY/utilities_1.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_1.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_4.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_6.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_7.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_8.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_9.f90 \ DFM_library/UTILITIES_LIBRARY/find_zero.f90 \ DFM_library/UTILITIES_LIBRARY/polynomial_equations.f90 prop_SRCS:=$(cmn_DEPS) \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/calc_Fermi.f90 \ DFM_library/PLASMON_LIBRARY/plasmon_ene.f90 \ DFM_library/SCALE_PARAMETERS_LIBRARY/scale_parameters.f90 \ DFM_library/ENERGIES_LIBRARY/correlation_energies.f90 \ DFM_library/ENERGIES_LIBRARY/delta_t.f90 \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/thermodynamic_properties.f90 \ DFM_library/SCREENING_LIBRARY/screening_vec1.f90 \ DFM_library/CONFINEMENT_LIBRARY/confinement_ff.f90 \ DFM_library/CONFINEMENT_LIBRARY/coulomb.f90 \ DFM_library/UTILITIES_LIBRARY/utilities_3.f90 \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/material_properties.f90 \ DFM_library/THERMAL_PROPERTIES_LIBRARY/thermal_properties.f90 \ DFM_library/ENERGIES_LIBRARY/xc_energies.f90 \ DFM_library/ENERGIES_LIBRARY/exchange_energies.f90 \ DFM_library/ENERGIES_LIBRARY/kinetic_energies.f90 \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/thermodynamic_quantities.f90 \ DFM_library/THERMAL_PROPERTIES_LIBRARY/chemical_potential.f90 \ DFM_library/UTILITIES_LIBRARY/utilities_4.f90 \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/calc_energies.f90 # # Read input data file: # read_SRCS:=DFM_library/INPUT_OUTPUT_LIBRARY/read_data.f90 read_OBJS:=$(patsubst %.f90,%.o, $(tool_SRCS) $(util_SRCS) $(prop_SRCS) $(read_SRCS)) io_SRCS:=DFM_library/INPUT_OUTPUT_LIBRARY/filenames.f90 \ DFM_library/INPUT_OUTPUT_LIBRARY/outfiles.f90 \ DFM_library/INPUT_OUTPUT_LIBRARY/change_filenames.f90 \ DFM_library/INPUT_OUTPUT_LIBRARY/store_coef.f90 \ DFM_library/INPUT_OUTPUT_LIBRARY/open_files.f90 \ DFM_library/PRINT_LIBRARY/print_headers.f90 \ DFM_library/PRINT_LIBRARY/print_calc_type.f90 \ DFM_library/PRINT_LIBRARY/print_Fermi.f90 \ DFM_library/PRINT_LIBRARY/print_plasmons.f90 \ DFM_library/PRINT_LIBRARY/print_scale_param.f90 \ DFM_library/PRINT_LIBRARY/print_material_lengths.f90 \ DFM_library/PRINT_LIBRARY/print_thermal.f90 \ DFM_library/PRINT_LIBRARY/print_thermodynamics.f90 \ DFM_library/PRINT_LIBRARY/print_energies.f90 \ DFM_library/INPUT_OUTPUT_LIBRARY/close_files.f90 io_OBJS:=$(patsubst %.f90,%.o, $(io_SRCS)) calc_DEPS:=$(cmn_DEPS) \ DFM_library/DIELECTRIC_FUNCTIONS_LIBRARY/dfuncl_static.f90 \ DFM_library/ASYMPTOTIC_VALUES_LIBRARY/gr_asymptotic.f90 \ DFM_library/ASYMPTOTIC_VALUES_LIBRARY/sq_asymptotic.f90 \ DFM_library/CONFINEMENT_LIBRARY/confinement_wf.f90 \ DFM_library/LOCAL_FIELD_LIBRARY/iq_functions_1.f90 \ DFM_library/MOMENTS_LIBRARY/loss_moments.f90 \ DFM_library/PAIR_DISTRIBUTION_FUNCTION/pair_distribution.f90 \ DFM_library/PAIR_CORRELATION_LIBRARY/pair_correlation.f90 \ DFM_library/STRUCTURE_FACTOR_LIBRARY/structure_factor_static.f90 \ DFM_library/LOCAL_FIELD_LIBRARY/iq_functions_2.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_2.f90 \ DFM_library/ASYMPTOTIC_VALUES_LIBRARY/gamma_asymptotic.f90 \ DFM_library/ASYMPTOTIC_VALUES_LIBRARY/calc_asymptotic.f90 \ DFM_library/LOCAL_FIELD_LIBRARY/local_field_static.f90 \ DFM_library/LOCAL_FIELD_LIBRARY/local_field_static_2.f90 \ DFM_library/STRUCTURE_FACTOR_LIBRARY/structure_factor_static_2.f90 \ DFM_library/NEVANLINNA_FUNCTIONS_LIBRARY/Nevanlinna_functions.f90 \ DFM_library/MEMORY_FUNCTIONS_LIBRARY/memory_functions.f90 \ DFM_library/SCREENING_LIBRARY/screening_vec2.f90 \ DFM_library/UTILITIES_LIBRARY/velocities.f90 \ DFM_library/SCALE_PARAMETERS_LIBRARY/scale_parameters.f90 \ DFM_library/MOMENTS_LIBRARY/moments.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_3.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_10.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/coulomb_log.f90 \ DFM_library/DAMPING_LIBRARY/packing_fraction.f90 \ DFM_library/DAMPING_LIBRARY/classical_fluid.f90 \ DFM_library/DAMPING_LIBRARY/diffusion_coefficient.f90 \ DFM_library/DAMPING_LIBRARY/electron_phonon_int.f90 \ DFM_library/DAMPING_LIBRARY/scattering_length.f90 \ DFM_library/DAMPING_LIBRARY/lifetime.f90 \ DFM_library/DAMPING_LIBRARY/viscosity.f90 \ DFM_library/DAMPING_LIBRARY/relaxation_time_static.f90 \ DFM_library/UTILITIES_LIBRARY/utic_parameters.f90 \ DFM_library/DAMPING_LIBRARY/decay_rate.f90 \ DFM_library/DAMPING_LIBRARY/calc_damping.f90 \ DFM_library/DAMPING_LIBRARY/diffusion_coefficient_2.f90 \ DFM_library/PLASMON_LIBRARY/plasmon_dispersion.f90 \ DFM_library/PLASMON_LIBRARY/q_bounds.f90 \ DFM_library/DAMPING_LIBRARY/plasmon_damping.f90 \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/calc_energies.f90 \ DFM_library/PHYSICAL_PROPERTIES_LIBRARY/grand_partition.f90 \ DFM_library/UTILITIES_LIBRARY/utilities_2.f90 \ DFM_library/LANDAU_PARAMETERS_LIBRARY/landau.f90 \ DFM_library/VARIOUS_FUNCTIONS_LIBRARY/phi_function.f90 \ DFM_library/DIELECTRIC_FUNCTIONS_LIBRARY/dfuncl_stan_dynamic.f90 \ DFM_library/DIELECTRIC_FUNCTIONS_LIBRARY/dfuncl_magn_dynamic.f90 \ DFM_library/DIELECTRIC_FUNCTIONS_LIBRARY/dfunct_dynamic.f90 \ DFM_library/STRUCTURE_FACTOR_LIBRARY/structure_factor_dynamic_2.f90 \ DFM_library/INTERACTION_POTENTIALS_LIBRARY/interaction_potentials_r.f90 \ DFM_library/INTERACTION_POTENTIALS_LIBRARY/interaction_potentials_k.f90 \ DFM_library/DAMPING_LIBRARY/decay_rate.f90 \ DFM_library/STRUCTURE_FACTOR_LIBRARY/structure_factor_dynamic.f90 \ DFM_library/DIELECTRIC_FUNCTIONS_LIBRARY/dfuncl_stan_dynamic_2.f90 \ DFM_library/DAMPING_LIBRARY/mean_free_path.f90 \ DFM_library/SPECTRAL_FUNCTION_LIBRARY/spectral_function.f90 \ DFM_library/LOCAL_FIELD_LIBRARY/local_field_dynamic.f90 \ DFM_library/PRINT_LIBRARY/print_asymptotic.f90 \ DFM_library/POST_PROCESSING_LIBRARY/re_eps_0_treatment.f90 \ DFM_library/MOMENTS_LIBRARY/moments_loss.f90 \ DFM_library/SPECIFIC_INTEGRALS_LIBRARY/specific_int_5.f90 # # Calculators: # calc_SRCS:=DFM_library/CALCULATORS_LIBRARY/calculators_1.f90 \ DFM_library/CALCULATORS_LIBRARY/calculators_2.f90 \ DFM_library/CALCULATORS_LIBRARY/calculators_3.f90 \ DFM_library/CALCULATORS_LIBRARY/calculators_5.f90 \ DFM_library/CALCULATORS_LIBRARY/calculators_7.f90 \ DFM_library/CALCULATORS_LIBRARY/calculators_8.f90 \ DFM_library/CALCULATORS_LIBRARY/calculators_9.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_1.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_2.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_3.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_5.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_7.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_8.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_9.f90 # # Test_integrals: # calc_TEST:=DFM_library/TEST_LIBRARY/test_integrals_2.f90 \ DFM_library/TEST_LIBRARY/test_integrals_3.f90 \ DFM_library/TEST_LIBRARY/test_integrals_8.f90 \ DFM_library/TEST_LIBRARY/test_int_Hubbard.f90 # # Post-processing: # calc_POST:=DFM_library/PLASMON_LIBRARY/plasmon_dispersion_2.f90 \ DFM_library/CALCULATORS_LIBRARY/calculators_p.f90 \ DFM_library/CALCULATORS_LIBRARY/call_calc_p.f90 calc_OBJS:=$(patsubst %.f90,%.o, $(calc_DEPS) $(calc_SRCS) $(calc_TEST) $(calc_POST)) SRCS:= $(patsubst %.o,%.f90,$(read_OBJS) $(io_OBJS) $(calc_OBJS)) OBJS:= $(addprefix $(BUILDDIR)/,$(notdir $(read_OBJS) $(io_OBJS) $(calc_OBJS))) all: obj $(EXE) obj: src $(OBJS) $(EXE): $(OBJS) $(BUILDDIR)/epsilon.f90 @echo "building main $@..." @$(FC) $(FFLAGS) $(LDFLAGS) $(LDLIBS) -J $(BUILDDIR) -o $@ $^ %.o: %.f90 @echo "Compiling $@..." @$(FC) $(FFLAGS) -J $(BUILDDIR) -I. -o $@ -c $^ src: $(SRCS) epsilon.f90 @echo "updating source tree..." @mkdir -p $(BUILDDIR) @rsync -av $^ $(BUILDDIR) clean: @echo "Cleaning..." @rm -rf $(BUILDDIR) @rm -rf $(EXE)