No rule to make target `write_restart - solution

Hi there,
For anyone who is having the issue that when they try to make lammps and they almost immediately come to an error such as:

make[1]: *** No rule to make target `write_restart.u’. Stop.

The problem arises because of an addition to the lammps Makefiles, which your old Makefile for your particular system will not have. You basically need to add:

Path to src files

vpath .cpp .. vpath .h …

to before the compile rules so the makefile knows where the source files are. I’m posting this as there was no answer when I googled the error, so hopefully this will give people in my position some help. If there are any errors in what I’ve posted here hopefully Axel will correct me.

John Savage

this is correct - we don’t change the lo-level Makefile
format often, but when we do, we obviously have no
way to migrate the change into user’s custom Makefiles.