I found the guide's formatting is a bit misleading and suspect that these lines in the makefile:
LAlib = -Wl,--start- group $(LAdir)/libmkl_intel_lp64.a $(LAdir)/libmkl_intel_thread.a $(LAdir)/libmkl_core.a -Wl, --end-group -lpthread -lm
Should actually be a single line as follows:
LAlib = -Wl,--start-group $(LAdir)/libmkl_intel_lp64.a $(LAdir)/libmkl_intel_thread.a $(LAdir)/libmkl_core.a -Wl, --end-group -lpthread -lm
In other words, if you have a line break after the --start- on line 105 then remove that and make sure line 106 that currently starts with group
is moved to the end of line 105.