I have conventional directory structure for a pass taken from project examples.
I want to build a tool which makes usage of a shared library which is included in the project.
This means that I have library here:
and after compilation the library is placed here
My tool is located here:
# cat tool/Makefile
LEVEL = ../
LIBS += -lfoo
When I build the tool:
# (cd tool && make)
llvm: Compiling test_foo.cc for Debug build
llvm: Linking Debug executable test_foo
... undefined reference ...
collect2: ld returned 1 exit status
Which means that the libfoo.so is not picked up from the Debug/lib directory.
In other words linker does not look into Debug/lib folder.
I can fix this with LDFLAGS but I believe the intention is different?