.. _Makefile: ############ The Makefile ############ KPP produces a :program:`Makefile` that allows for an easy compilation of all KPP-generated source files. The file name is :file:`Makefile_ROOT`. The Makefile assumes that the selected driver contains the main program. However, if no driver was selected (i.e. :command:`#DRIVER none`), it is necessary to add the name of the main program file manually to the Makefile. Use this command to compile KPP-generated source code into an executable: .. code-block:: console $ make -f Makefile_ROOT [target] Where :code:`[target]` is one of the following optional values: .. _Makefile_all: ==== all ==== Synoymm for :ref:`Makefile_exe`. .. _Makefile_gfortran: ================= COMPILER=GFORTRAN ================= Builds KPP-genereated Fortran-90 code into an executable with the GNU :program:`gfortran` compiler. This is the default setting for when :command:`#LANGUAGE Fortran90` is specified. .. _Makefile_gcc: ============ COMPILER=GCC ============ Builds KPP-generated C code into an executable with the GNU :program:`gcc` compiler. This is the default setting for when :command:`#LANGUAGE C` is specified. .. _Makefile_intel: ============== COMPILER=INTEL ============== Compiles Fortran-90 code generated by KPP into an executable with the GNU :program:`gfortran` compiler. Compiles C code generated by KPP into an executable with the Intel :program:`icc` compiler. .. _Makefile_exe: ==== exe ==== Compiles KPP-generated source code into an executable. This is the default option. .. _Makefile_mex: ==== mex ==== Compiles Matlab extensions into the executable when :ref:`#MEX ON ` is specified. .. _Makefile_clean: ===== clean ===== Removes the following files: - Object files (:file:`*.o`) - Fortran90 module files (:file:`*mod`) - Executable files (:file:`*.exe`) - :ref:`Log` (:file:`ROOT.log`) - Species concentrations specified with :ref:`#LOOKAT ` (:file:`*.dat`) - Comma-separated variable files generated by :ref:`graph-cmd` (:code:`*.csv`) - Matlab extensions generated by :ref:`mex-cmd` (:file:`ROOT*.mexglx`) - Output from the Matlab executable (:file:`results.m`) .. _Makefile_distclean: ========= distclean ========= Removes all of the files removed by :ref:`Makefile_clean`, as well as: - KPP-generated C source code (:file:`ROOT*.c`) - KPP-generated Fortran90 source code (:file:`ROOT*.f90`, :file:`ROOT*.F90`) - KPP-generated Matlab source code (:file:`ROOT*.m`)