Your makefile has the variable assignment (edited for brevity)...
LIBS = $(MATLAB_ROOT)/bin/glnxa64/libmwjpegreader.so ... $(shell pkg-config --libs opencv)
Where the $(shell pkg-config --libs opencv)
component will expand to something like...
-L/usr/local/lib -lopencv
But you then use $(LIBS)
as a dependency for several targets, e.g...
$(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) $(LIBS)
which expands to (again, edited for brevity)...
$(PRODUCT) : $(OBJS) $(PREBUILT_OBJS) -L/usr/local/lib -lopencv
Hence, when make
attempts to process the target $(PRODUCT)
it will see that the target seemingly depends on -L/usr/local/lib
and act accordingly.
It's difficult to provide a more complete answer without more context but $(LIBS)
probably shouldn't be listed as a dependency for this or any other targets.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…