How to create a new project in Yambo

From The Yambo Project
Jump to navigation Jump to search

1) Edit the file config/mk/targets.mk

In the following np stands for your new project. Choose two letters which will inequivocally identify your project. Example: "df" stands for "defects".

DF_PROJ = yambo_df ypp_df

2) Edit the file config/mk/actions/compile_yambo.mk and config/mk/actions/compile_ypp.mk by adding the new executables:

       yambo_df: ext-libs
       @+LIBS2DO="$(INT_LIBS)"; DIR2GO="lib" ; VPATH="$(topdir)/lib" ; $(mk_internal_lib)
       @+LIBS2DO="$(YLIBDRIVER)"; NAME="yambo_df_driver_"; DIR2GO="lib/yambo/driver/src"; VPATH="$(topdir)/lib/yambo/driver/src";\
       ADF="-D_DEFECTS -D_SC -D_yambo"; $(mk_external_yambo_lib)
       @+LIBS2DO="$(PJ_DFLIBS)"; XPATH="src"; VPATH="$(topdir)/src"; ADF="-D_DEFECTS -D_SC"; $(mk_src)
       @+X2DO="yambo_df"; XPATH="driver"; VPATH="$(topdir)/driver"; XLIBS="$(PJ_DFLIBS_LD)" ; DRILIBS="$(YLIBDRIVER_LD)"; \
       ADF="-D_DEFECTS -D_SC"; $(mk_yambo)


       ypp_df: ext-libs
       @+LIBS2DO="$(INT_LIBS)"; DIR2GO="lib" ; VPATH="$(topdir)/lib" ; $(mk_internal_lib)
       @+LIBS2DO="$(YLIBDRIVER)"; NAME="ypp_df_driver_"; DIR2GO="lib/yambo/driver/src"; VPATH="$(topdir)/lib/yambo/driver/src"; \
       ADF="-D_DEFECTS -D_SC -D_ypp"; $(mk_external_yambo_lib)
       @+LIBS2DO="$(YPPDF_MAIN_LIBS)"; XPATH="src"; VPATH="$(topdir)/src"; ADF="-D_DEFECTS -D_SC "; $(mk_src)
       @+LIBS2DO="$(YPP_LIBS)"; XPATH="ypp"; VPATH="$(topdir)/ypp"; ADF="-D_YPP_DEFECTS"; $(mk_ypp_src)
       @+X2DO="ypp_df"; XPATH="driver"; VPATH="$(topdir)/driver"; XLIBS="$(YPPDF_MAIN_LIBS_LD)"; \
       X_ypp_LIBS="$(YPP_LIBS_LD)"; DRILIBS="$(YLIBDRIVER_LD)"; ADF="-D_YPP_DEFECTS"; $(mk_ypp)