--- tools/Makefile.am-orig	2020-04-04 11:18:45.119361500 +0800
+++ tools/Makefile.am	2020-04-04 11:18:11.969303300 +0800
@@ -1,5 +1,5 @@
 MY_INCLUDE = -I$(top_srcdir)/include
-MY_LIBS = $(top_srcdir)/lib/marisa/libmarisa.la libcmdopt.la
+MY_LIBS = $(top_builddir)/lib/marisa/libmarisa.la libcmdopt.la
 
 AM_CXXFLAGS = -Wall -Weffc++ -Wextra -Wconversion $(MY_INCLUDE)
 
