Here are some examples on how to compile potfit.
Before you compile a new binary you should make sure that there are no old object files in your directory:
deletes all object files and most temporary files.
Setting the options
To compile potfit you have to know which options you want to enable. You can find a comprehensive list of all options here.
Assuming you want a potfit binary to optimize EAM potentials and also include stress, you can create it with the command:
Basically you can use any name for your binary, as long as the strings 'eam' and 'stress' are included. The command
would create the same binary as
make potfit_eam_stress, only with a different name.
To speed up the compilation (if you are very impatient) you can use the following command
make -j 8 clean potfit_eam_stress
This will use 8 processes in parallel to compile the object files and also clean your directory before compiling a new binary.
To pass custom flags to the compiler, you can use the environement variable
FLAGS="-fomit-frame-pointer" make potfit_pair_stress