Skip to content

Commit 682d9da

Browse files
committed
Merge pull request BVLC#1921 from shelhamer/fix-tool-linking
[build] fix dynamic linking of tools
2 parents 5ee85b7 + eabbccd commit 682d9da

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,12 @@ $(TOOL_BUILD_DIR)/%: $(TOOL_BUILD_DIR)/%.bin | $(TOOL_BUILD_DIR)
537537
@ $(RM) $@
538538
@ ln -s $(abspath $<) $@
539539

540-
$(TOOL_BINS) $(EXAMPLE_BINS): %.bin : %.o | $(DYNAMIC_NAME)
540+
$(TOOL_BINS): %.bin : %.o | $(DYNAMIC_NAME)
541+
@ echo CXX/LD -o $@
542+
$(Q)$(CXX) $< -o $@ $(LINKFLAGS) -l$(PROJECT) $(LDFLAGS) \
543+
-Wl,-rpath,$(ORIGIN)/../lib
544+
545+
$(EXAMPLE_BINS): %.bin : %.o | $(DYNAMIC_NAME)
541546
@ echo CXX/LD -o $@
542547
$(Q)$(CXX) $< -o $@ $(LINKFLAGS) -l$(PROJECT) $(LDFLAGS) \
543548
-Wl,-rpath,$(ORIGIN)/../../lib

0 commit comments

Comments
 (0)